agent: fix TestCheckHTTP_TLSSkipVerify_true_pass

Make check timing less aggressive and give the test some time
to execute.
pull/3241/head
Frank Schroeder 8 years ago committed by Frank Schröder
parent 9c54f30c94
commit b12b914017

@ -371,7 +371,7 @@ func TestCheckHTTP_TLSSkipVerify_true_pass(t *testing.T) {
Notify: notif,
CheckID: types.CheckID("skipverify_true"),
HTTP: server.URL,
Interval: 5 * time.Millisecond,
Interval: 25 * time.Millisecond,
Logger: log.New(ioutil.Discard, UniqueID(), log.LstdFlags),
TLSSkipVerify: true,
}
@ -379,6 +379,9 @@ func TestCheckHTTP_TLSSkipVerify_true_pass(t *testing.T) {
check.Start()
defer check.Stop()
// give check some time to execute
time.Sleep(200 * time.Millisecond)
if !check.httpClient.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify {
t.Fatalf("should be true")
}

Loading…
Cancel
Save