mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 21:35:52 +00:00
Revert "agent: skip non-sensical TestCatalogRegister"
This reverts commit ce1f35373e6ad1486cb83398fce70f5c54f910d3.
This commit is contained in:
parent
556bf3f85d
commit
fca0df59fb
@ -13,8 +13,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestCatalogRegister(t *testing.T) {
|
func TestCatalogRegister(t *testing.T) {
|
||||||
t.Skip("skipping since it is not clear what this test is supposed to verify")
|
|
||||||
|
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
a := NewTestAgent(t.Name(), "")
|
a := NewTestAgent(t.Name(), "")
|
||||||
defer a.Shutdown()
|
defer a.Shutdown()
|
||||||
@ -29,11 +27,28 @@ func TestCatalogRegister(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("err: %v", err)
|
t.Fatalf("err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
res := obj.(bool)
|
res := obj.(bool)
|
||||||
if res != true {
|
if res != true {
|
||||||
t.Fatalf("bad: %v", res)
|
t.Fatalf("bad: %v", res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo(fs): data race
|
||||||
|
// func() {
|
||||||
|
// a.State.Lock()
|
||||||
|
// defer a.State.Unlock()
|
||||||
|
|
||||||
|
// // Service should be in sync
|
||||||
|
// if err := a.State.syncService("foo"); err != nil {
|
||||||
|
// t.Fatalf("err: %s", err)
|
||||||
|
// }
|
||||||
|
// if _, ok := a.State.serviceStatus["foo"]; !ok {
|
||||||
|
// t.Fatalf("bad: %#v", a.State.serviceStatus)
|
||||||
|
// }
|
||||||
|
// if !a.State.serviceStatus["foo"].inSync {
|
||||||
|
// t.Fatalf("should be in sync")
|
||||||
|
// }
|
||||||
|
// }()
|
||||||
if err := a.State.SyncChanges(); err != nil {
|
if err := a.State.SyncChanges(); err != nil {
|
||||||
t.Fatal("sync failed: ", err)
|
t.Fatal("sync failed: ", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user