diff --git a/client/consul_test.go b/client/consul_test.go index e7bb8012ee4..f2fb18ef880 100644 --- a/client/consul_test.go +++ b/client/consul_test.go @@ -290,8 +290,8 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { Port: 8080, Address: "10.10.1.11", }, - "nomad-2121212": { - ID: "nomad-2121212", + "nomad-registered-service-2121212": { + ID: "nomad-registered-service-2121212", Service: "identity-service", Tags: []string{"global"}, Port: 8080, @@ -300,8 +300,8 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { } expSrvcs := map[string]*consul.AgentService{ - "nomad-2121212": { - ID: "nomad-2121212", + "nomad-registered-service-2121212": { + ID: "nomad-registered-service-2121212", Service: "identity-service", Tags: []string{"global"}, Port: 8080, @@ -327,7 +327,7 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { }, "212121212": { CheckID: "212121212", - ServiceID: "nomad-2121212", + ServiceID: "nomad-registered-service-2121212", Name: "ping", }, } @@ -335,7 +335,7 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { expChks := map[string]*consul.AgentCheck{ "212121212": { CheckID: "212121212", - ServiceID: "nomad-2121212", + ServiceID: "nomad-registered-service-2121212", Name: "ping", }, } diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 84a171e678f..82723965c53 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1146,7 +1146,7 @@ func (sc *ServiceCheck) Hash(serviceId string) string { } const ( - NomadConsulPrefix = "nomad" + NomadConsulPrefix = "nomad-registered-service" ) // The Service model represents a Consul service defintion