Added checks for QEMUArg contents in unit tests
@@ -291,6 +291,8 @@ var _ = Describe("Pod Network", func() {
TestRunPlug(driver)
Expect(len(domain.Spec.Devices.Interfaces)).To(Equal(0))
Expect(len(domain.Spec.QEMUCmd.QEMUArg)).To(Equal(2))
+ Expect(domain.Spec.QEMUCmd.QEMUArg[0]).To(Equal(api.Arg{Value: "-device"}))
+ Expect(domain.Spec.QEMUCmd.QEMUArg[1]).To(Equal(api.Arg{Value: "e1000,netdev=default,id=default"}))
})
It("Should create an interface in the qemu command line, remove it from the interfaces and leave the other interfaces inplace", func() {
domain := NewDomainWithSlirpInterface()
@@ -315,6 +317,8 @@ var _ = Describe("Pod Network", func() {
TestRunPlug(driver)
Expect(len(domain.Spec.Devices.Interfaces)).To(Equal(1))
Expect(len(domain.Spec.QEMUCmd.QEMUArg)).To(Equal(2))
+ Expect(domain.Spec.QEMUCmd.QEMUArg[0]).To(Equal(api.Arg{Value: "-device"}))
+ Expect(domain.Spec.QEMUCmd.QEMUArg[1]).To(Equal(api.Arg{Value: "e1000,netdev=default,id=default"}))
})
})
})
