diff --git a/agent/consul/state/catalog_oss_test.go b/agent/consul/state/catalog_oss_test.go index c33b12df9..50a50d049 100644 --- a/agent/consul/state/catalog_oss_test.go +++ b/agent/consul/state/catalog_oss_test.go @@ -8,9 +8,11 @@ import ( func testIndexerTableChecks() map[string]indexerTestCase { obj := &structs.HealthCheck{ - Node: "NoDe", - ServiceID: "SeRvIcE", - CheckID: "CheckID", + Node: "NoDe", + ServiceID: "SeRvIcE", + ServiceName: "ServiceName", + CheckID: "CheckID", + Status: "PASSING", } return map[string]indexerTestCase{ indexID: { @@ -36,6 +38,30 @@ func testIndexerTableChecks() map[string]indexerTestCase { }, }, }, + indexStatus: { + read: indexValue{ + source: []interface{}{ + "PASSING", + }, + expected: []byte("PASSING\x00"), + }, + write: indexValue{ + source: obj, + expected: []byte("PASSING\x00"), + }, + }, + indexService: { + read: indexValue{ + source: []interface{}{ + "ServiceName", + }, + expected: []byte("servicename\x00"), + }, + write: indexValue{ + source: obj, + expected: []byte("servicename\x00"), + }, + }, indexNodeService: { read: indexValue{ source: NodeServiceQuery{