8 562d5c1e 2022-01-19 o func TestHostUnmarshal(t *testing.T) {
9 717a9e78 2022-02-02 o f, err := os.Open("testdata/objects/hosts/VuS9jZ8u.example.org")
10 562d5c1e 2022-01-19 o if err != nil {
13 562d5c1e 2022-01-19 o defer f.Close()
14 562d5c1e 2022-01-19 o resp, err := parseResponse(f)
15 562d5c1e 2022-01-19 o if err != nil {
18 cb667a50 2022-02-12 o host := resp.Results[0].(Host)
19 cb667a50 2022-02-12 o if host.LastCheck.IsZero() {
20 cb667a50 2022-02-12 o t.Error("zero time")
22 cb667a50 2022-02-12 o if !host.Acknowledgement {
23 cb667a50 2022-02-12 o t.Error("should be acknowledged")
25 cb667a50 2022-02-12 o if t.Failed() {