Updating learning test to execute command inside of pod instead of vmi.
@@ -119,14 +119,9 @@ var _ = Describe("Networking", func() {
Expect(err).ToNot(HaveOccurred())
}
- checkLearningState := func(vmi *v1.VirtualMachineInstance, expectedValue string, prompt string) {
- err := tests.CheckForTextExpecter(vmi, []expect.Batcher{
- &expect.BSnd{S: "\n"},
- &expect.BExp{R: prompt},
- &expect.BSnd{S: "cat /sys/class/net/eth0/brport/learning\n"},
- &expect.BExp{R: expectedValue},
- }, 15)
- Expect(err).ToNot(HaveOccurred())
+ checkLearningState := func(vmi *v1.VirtualMachineInstance, expectedValue string) {
+ output := tests.RunCommandOnVmiPod(vmi, []string{"cat", "/sys/class/net/eth0/brport/learning"})
+ Expect(output).To(Equal(expectedValue))
}
Describe("Multiple virtual machines connectivity", func() {
@@ -575,7 +570,7 @@ var _ = Describe("Networking", func() {
Expect(err).ToNot(HaveOccurred())
tests.WaitUntilVMIReady(learningDisabledVMI, tests.LoggedInAlpineExpecter)
- checkLearningState(learningDisabledVMI, "0", "localhost:~#")
+ checkLearningState(learningDisabledVMI, "0")
})
})
})
