mirror of https://github.com/status-im/consul.git
Fix test for ENT (#11941)
This commit is contained in:
parent
e653f81919
commit
e4bcaac08c
|
@ -2149,12 +2149,14 @@ func TestState_RemoveServiceErrorMessages(t *testing.T) {
|
|||
require.NoError(err)
|
||||
|
||||
// Attempt to remove service that doesn't exist
|
||||
err = state.RemoveService(structs.NewServiceID("db", nil))
|
||||
require.Contains(err.Error(), `Unknown service ID "db"`)
|
||||
sid := structs.NewServiceID("db", nil)
|
||||
err = state.RemoveService(sid)
|
||||
require.Contains(err.Error(), fmt.Sprintf(`Unknown service ID %q`, sid))
|
||||
|
||||
// Attempt to remove service by name (which isn't valid)
|
||||
err = state.RemoveService(structs.NewServiceID("web-name", nil))
|
||||
require.Contains(err.Error(), `Unknown service ID "web-name"`)
|
||||
sid2 := structs.NewServiceID("web-name", nil)
|
||||
err = state.RemoveService(sid2)
|
||||
require.Contains(err.Error(), fmt.Sprintf(`Unknown service ID %q`, sid2))
|
||||
|
||||
// Attempt to remove service by id (valid)
|
||||
err = state.RemoveService(structs.NewServiceID("web-id", nil))
|
||||
|
|
Loading…
Reference in New Issue