state: add tests for services.kind indexer

This commit is contained in:
Daniel Nephin 2021-03-26 18:11:41 -04:00
parent 9f9eadd569
commit bcde8d2fad
1 changed files with 12 additions and 0 deletions

View File

@ -237,5 +237,17 @@ func testIndexerTableServices() map[string]indexerTestCase {
expected: []byte("connectname\x00"),
},
},
indexKind: {
read: indexValue{
source: "connect-proxy",
expected: []byte("connect-proxy\x00"),
},
write: indexValue{
source: &structs.ServiceNode{
ServiceKind: structs.ServiceKindConnectProxy,
},
expected: []byte("connect-proxy\x00"),
},
},
}
}