agent: fix TestCheckHTTP_TLSSkipVerify_true_pass

Make check timing less aggressive and give the test some time
to execute.
This commit is contained in:
Frank Schroeder 2017-07-04 11:01:56 +02:00 committed by Frank Schröder
parent 9c54f30c94
commit b12b914017
1 changed files with 4 additions and 1 deletions

View File

@ -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")
}