russellcardullo/go-pingdom

Tests are broken for TestCheckServiceList

partamonov opened this issue · 1 comments

--- FAIL: TestCheckServiceList (0.00s)
	check_test.go:145: ListChecks returned [{ID:85975 Name:My check 1 Resolution:1 SendToAndroid:false SendToEmail:false SendToIPhone:false SendToSms:false SendToTwitter:false SendNotificationWhenDown:0 NotifyAgainEvery:0 NotifyWhenBackup:false Created:0 Hostname:example.com Status:up LastErrorTime:1297446423 LastTestTime:1300977363 LastResponseTime:355 Paused:false ContactIds:[] IntegrationIds:[] Type:{Name:http HTTP:<nil>} Tags:[{Name:apache Type:a Count:2}]} {ID:161748 Name:My check 2 Resolution:5 SendToAndroid:false SendToEmail:false SendToIPhone:false SendToSms:false SendToTwitter:false SendNotificationWhenDown:0 NotifyAgainEvery:0 NotifyWhenBackup:false Created:0 Hostname:mydomain.com Status:up LastErrorTime:1299194968 LastTestTime:1300977268 LastResponseTime:1141 Paused:false ContactIds:[] IntegrationIds:[] Type:{Name:ping HTTP:<nil>} Tags:[{Name:nginx Type:u Count:1}]} {ID:208655 Name:My check 3 Resolution:1 SendToAndroid:false SendToEmail:false SendToIPhone:false SendToSms:false SendToTwitter:false SendNotificationWhenDown:0 NotifyAgainEvery:0 NotifyWhenBackup:false Created:0 Hostname:example.net Status:down LastErrorTime:1300527997 LastTestTime:1300977337 LastResponseTime:800 Paused:false ContactIds:[] IntegrationIds:[] Type:{Name:http HTTP:<nil>} Tags:[{Name:apache Type:a Count:2}]}], want [{ID:85975 Name:My check 1 Resolution:1 SendToAndroid:false SendToEmail:false SendToIPhone:false SendToSms:false SendToTwitter:false SendNotificationWhenDown:0 NotifyAgainEvery:0 NotifyWhenBackup:false Created:0 Hostname:example.com Status:up LastErrorTime:1297446423 LastTestTime:1300977363 LastResponseTime:355 Paused:false ContactIds:[] IntegrationIds:[] Type:{Name:http HTTP:<nil>} Tags:[{Name:apache Type:a Count:2}]} {ID:161748 Name:My check 2 Resolution:5 SendToAndroid:false SendToEmail:false SendToIPhone:false SendToSms:false SendToTwitter:false SendNotificationWhenDown:0 NotifyAgainEvery:0 NotifyWhenBackup:false Created:0 Hostname:mydomain.com Status:up LastErrorTime:1299194968 LastTestTime:1300977268 LastResponseTime:1141 Paused:false ContactIds:[] IntegrationIds:[] Type:{Name:ping HTTP:<nil>} Tags:[{Name:nginx Type:u Count:1}]} {ID:208655 Name:My check 3 Resolution:1 SendToAndroid:false SendToEmail:false SendToIPhone:false SendToSms:false SendToTwitter:false SendNotificationWhenDown:0 NotifyAgainEvery:0 NotifyWhenBackup:false Created:0 Hostname:example.net Status:down LastErrorTime:1300527997 LastTestTime:1300977337 LastResponseTime:800 Paused:false ContactIds:[] IntegrationIds:[] Type:{Name:http HTTP:<nil>} Tags:[{Name:apache Type:a Count:2}]}]

Appeared due to change Count type to interface in

type CheckResponseTag struct {
	Name  string      `json:"name"`
	Type  string      `json:"type"`
	Count interface{} `json:"count"`
}

Fixed in #18