state: add tests for checks indexers
This commit is contained in:
parent
98d6dcbdf8
commit
9251ac881a
|
@ -10,7 +10,9 @@ func testIndexerTableChecks() map[string]indexerTestCase {
|
|||
obj := &structs.HealthCheck{
|
||||
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