diff --git a/api/util_test.go b/api/util_test.go index 1c1073ed7..dfd0e95d0 100644 --- a/api/util_test.go +++ b/api/util_test.go @@ -17,9 +17,6 @@ func assertWriteMeta(t *testing.T, wm *WriteMeta) { if wm.LastIndex == 0 { t.Fatalf("bad index: %d", wm.LastIndex) } - if wm.RequestTime == 0 { - t.Fatalf("bad request time: %d", wm.RequestTime) - } } func testJob() *Job { diff --git a/client/consul_test.go b/client/consul_test.go index e7bb8012e..f2fb18ef8 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/command/agent/config.go b/command/agent/config.go index e3fb3ae17..8ee166842 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -613,7 +613,7 @@ func LoadConfig(path string) (*Config, error) { if fi.IsDir() { return LoadConfigDir(path) } - return LoadConfigFile(path) + return LoadConfigFile(filepath.Clean(path)) } // LoadConfigString is used to parse a config string diff --git a/command/agent/config_test.go b/command/agent/config_test.go index e342b997b..f89386a95 100644 --- a/command/agent/config_test.go +++ b/command/agent/config_test.go @@ -327,7 +327,7 @@ func TestConfig_LoadConfigsFileOrder(t *testing.T) { config := config1.Merge(config2) if !reflect.DeepEqual(config.Files, expected) { - t.Errorf("Loaded configs don't match\nExpected\n%+vGot\n%+v\n", + t.Errorf("Loaded configs don't match\nwant: %+v\n got: %+v\n", expected, config.Files) } } diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 84a171e67..82723965c 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