virt-handler defaults: add test for Domain.Spec defaulting
@@ -13,4 +13,11 @@ var _ = Describe("Defaults", func() {
Expect(domain.Spec.OS.Type.Machine).To(Equal("q35"))
Expect(domain.Spec.OS.Type.OS).To(Equal("hvm"))
})
+
+ It("should set libvirt namespace and use QEMU as emulator", func() {
+ domain := &Domain{}
+ SetDefaults_DomainSpec(&domain.Spec)
+ Expect(domain.Spec.XmlNS).To(Equal("http://libvirt.org/schemas/domain/qemu/1.0"))
+ Expect(domain.Spec.Type).To(Equal("qemu"))
+ })
})
