state: add tests for checks indexers
This commit is contained in:
parent
98d6dcbdf8
commit
9251ac881a
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue