JackDoan 1 день тому
батько
коміт
b7cee0dd6a
1 змінених файлів з 7 додано та 3 видалено
  1. 7 3
      e2e/tunnels_test.go

+ 7 - 3
e2e/tunnels_test.go

@@ -124,11 +124,11 @@ func TestCertUpgrade(t *testing.T) {
 		panic(err)
 	}
 
-	r.Logf("reload new v2 config")
+	r.Logf("reload new v2-only config")
 	err = myC.ReloadConfigString(string(cb))
 	assert.NoError(t, err)
-	r.Logf("yay")
-	r.Log("spin until their sees it")
+	r.Log("yay, spin until their sees it")
+	waitStart := time.Now()
 	for {
 		assertTunnel(t, myVpnIpNet[0].Addr(), theirVpnIpNet[0].Addr(), myControl, theirControl, r)
 		c := theirControl.GetHostInfoByVpnAddr(myVpnIpNet[0].Addr(), false)
@@ -141,6 +141,10 @@ func TestCertUpgrade(t *testing.T) {
 				break
 			}
 		}
+		since := time.Since(waitStart)
+		if since > time.Second*10 {
+			t.Fatal("Cert should be new by now")
+		}
 		time.Sleep(time.Second)
 	}