Initializing embedded structs is weird

This commit is contained in:
Michael Schurter 2017-08-17 15:18:55 -07:00
parent 9a466bcf5e
commit 7f6e1f3a9c

View file

@ -1378,14 +1378,16 @@ func TestCreateCheckReg(t *testing.T) {
ID: checkID, ID: checkID,
Name: "name", Name: "name",
ServiceID: serviceID, 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) actual, err := createCheckReg(serviceID, checkID, check, host, port)
if err != nil { if err != nil {