Initializing embedded structs is weird

This commit is contained in:
Michael Schurter 2017-08-17 15:18:55 -07:00
parent 9a466bcf5e
commit 7f6e1f3a9c
1 changed files with 9 additions and 7 deletions

View File

@ -1378,14 +1378,16 @@ func TestCreateCheckReg(t *testing.T) {
ID: checkID,
Name: "name",
ServiceID: serviceID,
AgentServiceCheck: api.AgentServiceCheck{
Timeout: "0s",
Interval: "0s",
HTTP: fmt.Sprintf("http://%s:%d/path", host, port),
Method: "POST",
Header: map[string][]string{
"Foo": {"bar"},
},
},
}
expected.Timeout = "0s"
expected.Interval = "0s"
expected.HTTP = fmt.Sprintf("http://%s:%d/path", host, port)
expected.Header = map[string][]string{
"Foo": {"bar"},
}
expected.Method = "POST"
actual, err := createCheckReg(serviceID, checkID, check, host, port)
if err != nil {