Fix nginx_plus tests with 32bit int

This commit is contained in:
Daniel Nelson 2017-09-25 15:48:09 -07:00 committed by Daniel Nelson
parent f823fc73f6
commit 5dff5932fd
2 changed files with 9 additions and 9 deletions

View File

@ -162,10 +162,10 @@ type Status struct {
} `json:"processes"`
Connections struct {
Accepted int `json:"accepted"`
Dropped int `json:"dropped"`
Active int `json:"active"`
Idle int `json:"idle"`
Accepted int64 `json:"accepted"`
Dropped int64 `json:"dropped"`
Active int64 `json:"active"`
Idle int64 `json:"idle"`
} `json:"connections"`
Ssl *struct { // added in version 6

View File

@ -25,7 +25,7 @@ const sampleStatusResponse = `
"processes": {
"respawned": 9999
},
"connections": {
"connections": {
"accepted": 1234567890000,
"dropped": 2345678900000,
"active": 345,
@ -306,10 +306,10 @@ func TestNginxPlusGeneratesMetrics(t *testing.T) {
t,
"nginx_plus_connections",
map[string]interface{}{
"accepted": int(1234567890000),
"dropped": int(2345678900000),
"active": int(345),
"idle": int(567),
"accepted": int64(1234567890000),
"dropped": int64(2345678900000),
"active": int64(345),
"idle": int64(567),
},
map[string]string{
"server": host,