feat(server): test customAutoRefresh env retrieval

pull/5735/head
Pavel Zavora 2021-04-20 07:57:25 +02:00
parent 00977512c0
commit 4bbea14ad6
1 changed files with 14 additions and 0 deletions

View File

@ -38,6 +38,20 @@ func TestEnvironment(t *testing.T) {
body: `{"links":{"self":"/chronograf/v1/env"},"telegrafSystemInterval":"1m0s","hostPageDisabled":false}`,
},
},
{
name: "Get environment with CustomAutoRefresh",
fields: fields{
Environment: chronograf.Environment{
TelegrafSystemInterval: 2 * time.Minute,
CustomAutoRefresh: "500ms=500",
},
},
wants: wants{
statusCode: 200,
contentType: "application/json",
body: `{"links":{"self":"/chronograf/v1/env"},"telegrafSystemInterval":"2m0s","hostPageDisabled":false,"customAutoRefresh": "500ms=500"}`,
},
},
}
for _, tt := range tests {