user agent

pull/10/head
Hunter Long 2018-06-29 22:17:51 -07:00
parent ae95aa1745
commit 244e24391a
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ func (s *Service) Check() *Service {
Timeout: 30 * time.Second,
}
response, err := client.Get(s.Domain)
response.Header.Set("User-Agent", "StatupMonitor")
t2 := time.Now()
s.Latency = t2.Sub(t1).Seconds()
if err != nil {

View File

@ -292,7 +292,7 @@ func TestFailingPrometheusHandler(t *testing.T) {
assert.Nil(t, err)
rr := httptest.NewRecorder()
route.ServeHTTP(rr, req)
assert.Equal(t, 55, rr.Result().StatusCode)
assert.Equal(t, 401, rr.Result().StatusCode)
}
func TestLoginHandler(t *testing.T) {