fix e2e startup flaky test (#7839)

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
This commit is contained in:
Ian Cardoso 2023-07-03 14:35:56 -03:00 committed by GitHub
parent 72d50b1f7c
commit 324f9ad4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,9 +257,12 @@ var _ = Describe("Various Startup Configurations", Ordered, func() {
tokenYAML := "token: aaaaaa.bbbbbbbbbbbbbbbb"
err := StartK3sCluster(append(serverNodeNames, agentNodeNames...), tokenYAML, tokenYAML)
Expect(err).To(HaveOccurred())
logs, err := e2e.GetJournalLogs(serverNodeNames[0])
Expect(err).NotTo(HaveOccurred())
Expect(logs).To(ContainSubstring("failed to normalize server token"))
Eventually(func(g Gomega) {
logs, err := e2e.GetJournalLogs(serverNodeNames[0])
g.Expect(err).NotTo(HaveOccurred())
g.Expect(logs).To(ContainSubstring("failed to normalize server token"))
}, "120s", "5s").Should(Succeed())
})
It("Kills the cluster", func() {
err := KillK3sCluster(append(serverNodeNames, agentNodeNames...))