mirror of https://github.com/status-im/consul.git
agent: fix TestCheckHTTP_TLSSkipVerify_true_pass
Make check timing less aggressive and give the test some time to execute.
This commit is contained in:
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…
Reference in New Issue