Initializing embedded structs is weird
This commit is contained in:
parent
9a466bcf5e
commit
7f6e1f3a9c
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue