Merge pull request #38196 from deads2k/fix-mesos

fix mesos unit tests
This commit is contained in:
Eric Paris 2016-12-06 12:24:10 -05:00 committed by GitHub
commit 81b3644017
2 changed files with 12 additions and 12 deletions

View File

@ -56,9 +56,9 @@ const (
"cpus": 8 "cpus": 8
}, },
"registered_time": 1429456502.46999, "registered_time": 1429456502.46999,
"pid": "slave(1)@mesos1.internal.company.com:5050", "pid": "slave(1)@mesos1.internal.example.org.fail:5050",
"id": "20150419-081501-16777343-5050-16383-S2", "id": "20150419-081501-16777343-5050-16383-S2",
"hostname": "mesos1.internal.company.com", "hostname": "mesos1.internal.example.org.fail",
"attributes": {}, "attributes": {},
"active": true "active": true
}, },
@ -70,9 +70,9 @@ const (
"cpus": 8 "cpus": 8
}, },
"registered_time": 1429456502.4144, "registered_time": 1429456502.4144,
"pid": "slave(1)@mesos2.internal.company.com:5050", "pid": "slave(1)@mesos2.internal.example.org.fail:5050",
"id": "20150419-081501-16777343-5050-16383-S1", "id": "20150419-081501-16777343-5050-16383-S1",
"hostname": "mesos2.internal.company.com", "hostname": "mesos2.internal.example.org.fail",
"attributes": {}, "attributes": {},
"active": true "active": true
}, },
@ -84,17 +84,17 @@ const (
"cpus": 8 "cpus": 8
}, },
"registered_time": 1429456502.02879, "registered_time": 1429456502.02879,
"pid": "slave(1)@mesos3.internal.company.com:5050", "pid": "slave(1)@mesos3.internal.example.org.fail:5050",
"id": "20150419-081501-16777343-5050-16383-S0", "id": "20150419-081501-16777343-5050-16383-S0",
"hostname": "mesos3.internal.company.com", "hostname": "mesos3.internal.example.org.fail",
"attributes": {}, "attributes": {},
"active": true "active": true
} }
], ],
"pid": "master@mesos-master0.internal.company.com:5050", "pid": "master@mesos-master0.internal.example.org.fail:5050",
"orphan_tasks": [], "orphan_tasks": [],
"lost_tasks": 0, "lost_tasks": 0,
"leader": "master@mesos-master0.internal.company.com:5050", "leader": "master@mesos-master0.internal.example.org.fail:5050",
"killed_tasks": 0, "killed_tasks": 0,
"failed_tasks": 0, "failed_tasks": 0,
"elected_time": 1429456501.61638, "elected_time": 1429456501.61638,
@ -234,9 +234,9 @@ func Test_listSlaves(t *testing.T) {
} }
expectedHostnames := map[string]struct{}{ expectedHostnames := map[string]struct{}{
"mesos1.internal.company.com": {}, "mesos1.internal.example.org.fail": {},
"mesos2.internal.company.com": {}, "mesos2.internal.example.org.fail": {},
"mesos3.internal.company.com": {}, "mesos3.internal.example.org.fail": {},
} }
actualHostnames := make(map[string]struct{}) actualHostnames := make(map[string]struct{})

View File

@ -269,7 +269,7 @@ func Test_ExternalID(t *testing.T) {
t.Fatalf("ExternalID did not return InstanceNotFound on an unknown instance") t.Fatalf("ExternalID did not return InstanceNotFound on an unknown instance")
} }
slaveName := types.NodeName("mesos3.internal.company.com") slaveName := types.NodeName("mesos3.internal.example.org.fail")
id, err := mesosCloud.ExternalID(slaveName) id, err := mesosCloud.ExternalID(slaveName)
if id != "" { if id != "" {
t.Fatalf("ExternalID should not be able to resolve %q", slaveName) t.Fatalf("ExternalID should not be able to resolve %q", slaveName)