mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
test for unique_tag present in response
This commit is contained in:
@@ -4116,13 +4116,15 @@ func TestMonitorJsz(t *testing.T) {
|
||||
max_mem_store: 10Mb
|
||||
max_file_store: 10Mb
|
||||
store_dir: '%s'
|
||||
unique_tag: az
|
||||
}
|
||||
cluster {
|
||||
name: cluster_name
|
||||
listen: 127.0.0.1:%d
|
||||
routes: [nats-route://127.0.0.1:%d]
|
||||
}
|
||||
server_name: server_%d `, test.port, test.mport, tmpDir, test.cport, test.routed, test.port)))
|
||||
server_name: server_%d
|
||||
server_tags: [ "az:%d" ] `, test.port, test.mport, tmpDir, test.cport, test.routed, test.port, test.port)))
|
||||
defer removeFile(t, cf)
|
||||
|
||||
s, _ := RunServerWithConfig(cf)
|
||||
@@ -4393,6 +4395,14 @@ func TestMonitorJsz(t *testing.T) {
|
||||
}
|
||||
}
|
||||
})
|
||||
t.Run("unique-tag-exists", func(t *testing.T) {
|
||||
for _, url := range []string{monUrl1, monUrl2} {
|
||||
info := readJsInfo(url)
|
||||
if len(info.Config.UniqueTag) == 0 {
|
||||
t.Fatalf("expected unique_tag to be returned by %s but got %v", url, info)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestMonitorReloadTLSConfig(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user