Merge branch 'master' of github.com:hashicorp/nomad

This commit is contained in:
Diptanu Choudhury
2015-12-14 15:07:37 -08:00
5 changed files with 9 additions and 12 deletions

View File

@@ -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 {

View File

@@ -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",
},
}

View File

@@ -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

View File

@@ -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)
}
}

View File

@@ -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