|
|
|
@ -315,20 +315,20 @@ func TestUiServices(t *testing.T) {
|
|
|
|
|
// internal accounting that users don't see can be blown away
|
|
|
|
|
for _, sum := range summary { |
|
|
|
|
sum.externalSourceSet = nil |
|
|
|
|
sum.proxyForSet = nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
expected := []*ServiceSummary{ |
|
|
|
|
{ |
|
|
|
|
Kind: structs.ServiceKindTypical, |
|
|
|
|
Name: "api", |
|
|
|
|
Tags: []string{"tag1", "tag2"}, |
|
|
|
|
Nodes: []string{"foo"}, |
|
|
|
|
InstanceCount: 1, |
|
|
|
|
ChecksPassing: 2, |
|
|
|
|
ChecksWarning: 1, |
|
|
|
|
ChecksCritical: 0, |
|
|
|
|
EnterpriseMeta: *structs.DefaultEnterpriseMeta(), |
|
|
|
|
Kind: structs.ServiceKindTypical, |
|
|
|
|
Name: "api", |
|
|
|
|
Tags: []string{"tag1", "tag2"}, |
|
|
|
|
Nodes: []string{"foo"}, |
|
|
|
|
InstanceCount: 1, |
|
|
|
|
ChecksPassing: 2, |
|
|
|
|
ChecksWarning: 1, |
|
|
|
|
ChecksCritical: 0, |
|
|
|
|
ConnectedWithProxy: true, |
|
|
|
|
EnterpriseMeta: *structs.DefaultEnterpriseMeta(), |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
Kind: structs.ServiceKindTypical, |
|
|
|
@ -347,7 +347,6 @@ func TestUiServices(t *testing.T) {
|
|
|
|
|
Tags: nil, |
|
|
|
|
Nodes: []string{"bar", "foo"}, |
|
|
|
|
InstanceCount: 2, |
|
|
|
|
ProxyFor: []string{"api"}, |
|
|
|
|
ChecksPassing: 2, |
|
|
|
|
ChecksWarning: 1, |
|
|
|
|
ChecksCritical: 1, |
|
|
|
@ -384,20 +383,20 @@ func TestUiServices(t *testing.T) {
|
|
|
|
|
// internal accounting that users don't see can be blown away
|
|
|
|
|
for _, sum := range summary { |
|
|
|
|
sum.externalSourceSet = nil |
|
|
|
|
sum.proxyForSet = nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
expected := []*ServiceSummary{ |
|
|
|
|
{ |
|
|
|
|
Kind: structs.ServiceKindTypical, |
|
|
|
|
Name: "api", |
|
|
|
|
Tags: []string{"tag1", "tag2"}, |
|
|
|
|
Nodes: []string{"foo"}, |
|
|
|
|
InstanceCount: 1, |
|
|
|
|
ChecksPassing: 2, |
|
|
|
|
ChecksWarning: 1, |
|
|
|
|
ChecksCritical: 0, |
|
|
|
|
EnterpriseMeta: *structs.DefaultEnterpriseMeta(), |
|
|
|
|
Kind: structs.ServiceKindTypical, |
|
|
|
|
Name: "api", |
|
|
|
|
Tags: []string{"tag1", "tag2"}, |
|
|
|
|
Nodes: []string{"foo"}, |
|
|
|
|
InstanceCount: 1, |
|
|
|
|
ChecksPassing: 2, |
|
|
|
|
ChecksWarning: 1, |
|
|
|
|
ChecksCritical: 0, |
|
|
|
|
ConnectedWithProxy: true, |
|
|
|
|
EnterpriseMeta: *structs.DefaultEnterpriseMeta(), |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
Kind: structs.ServiceKindConnectProxy, |
|
|
|
@ -405,7 +404,6 @@ func TestUiServices(t *testing.T) {
|
|
|
|
|
Tags: nil, |
|
|
|
|
Nodes: []string{"bar", "foo"}, |
|
|
|
|
InstanceCount: 2, |
|
|
|
|
ProxyFor: []string{"api"}, |
|
|
|
|
ChecksPassing: 2, |
|
|
|
|
ChecksWarning: 1, |
|
|
|
|
ChecksCritical: 1, |
|
|
|
|