Browse Source

Attempt to fix a bootstrap tests

Mariano Cano 4 years ago
parent
commit
41ea67ce10
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ca/bootstrap_test.go

+ 1 - 1
ca/bootstrap_test.go

@@ -408,6 +408,7 @@ func TestBootstrapClientServerRotation(t *testing.T) {
 		server.ServeTLS(listener, "", "")
 		server.ServeTLS(listener, "", "")
 	}()
 	}()
 	defer server.Close()
 	defer server.Close()
+	time.Sleep(1 * time.Second)
 
 
 	// Create bootstrap client
 	// Create bootstrap client
 	token = generateBootstrapToken(caURL, "client", "ef742f95dc0d8aa82d3cca4017af6dac3fce84290344159891952d18c53eefe7")
 	token = generateBootstrapToken(caURL, "client", "ef742f95dc0d8aa82d3cca4017af6dac3fce84290344159891952d18c53eefe7")
@@ -419,7 +420,6 @@ func TestBootstrapClientServerRotation(t *testing.T) {
 
 
 	// doTest does a request that requires mTLS
 	// doTest does a request that requires mTLS
 	doTest := func(client *http.Client) error {
 	doTest := func(client *http.Client) error {
-		time.Sleep(1 * time.Second)
 		// test with ca
 		// test with ca
 		resp, err := client.Post(caURL+"/renew", "application/json", http.NoBody)
 		resp, err := client.Post(caURL+"/renew", "application/json", http.NoBody)
 		if err != nil {
 		if err != nil {