|
|
|
@ -2595,8 +2595,9 @@ func testAgent_RegisterService_ReRegister_ReplaceExistingChecks(t *testing.T, ex
|
|
|
|
|
Port: 8000, |
|
|
|
|
Checks: []*structs.CheckType{ |
|
|
|
|
&structs.CheckType{ |
|
|
|
|
CheckID: types.CheckID("check_1"), |
|
|
|
|
TTL: 20 * time.Second, |
|
|
|
|
// explicitly not setting the check id to let it be auto-generated
|
|
|
|
|
// we want to ensure that we are testing out the cases with autogenerated names/ids
|
|
|
|
|
TTL: 20 * time.Second, |
|
|
|
|
}, |
|
|
|
|
&structs.CheckType{ |
|
|
|
|
CheckID: types.CheckID("check_2"), |
|
|
|
@ -2619,8 +2620,7 @@ func testAgent_RegisterService_ReRegister_ReplaceExistingChecks(t *testing.T, ex
|
|
|
|
|
Port: 8000, |
|
|
|
|
Checks: []*structs.CheckType{ |
|
|
|
|
&structs.CheckType{ |
|
|
|
|
CheckID: types.CheckID("check_1"), |
|
|
|
|
TTL: 20 * time.Second, |
|
|
|
|
TTL: 20 * time.Second, |
|
|
|
|
}, |
|
|
|
|
&structs.CheckType{ |
|
|
|
|
CheckID: types.CheckID("check_3"), |
|
|
|
@ -2644,7 +2644,7 @@ func testAgent_RegisterService_ReRegister_ReplaceExistingChecks(t *testing.T, ex
|
|
|
|
|
checkIDs = append(checkIDs, string(id)) |
|
|
|
|
} |
|
|
|
|
sort.Strings(checkIDs) |
|
|
|
|
require.Equal(t, []string{"check_1", "check_3"}, checkIDs) |
|
|
|
|
require.ElementsMatch(t, []string{"service:test:1", "check_3"}, checkIDs) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestAgent_RegisterService_TranslateKeys(t *testing.T) { |
|
|
|
|