mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Merge pull request #1077 from ozhuraki/envtest-crud-and-upgrade
envtest: Fix upgrade test fail when the tests for CRUD operations fail
This commit is contained in:
commit
611b4d3a18
@ -128,4 +128,8 @@ var _ = Describe("DlbDevicePlugin Controller", func() {
|
||||
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("dlb", &devicepluginv1.DlbDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -162,4 +162,8 @@ var _ = Describe("DsaDevicePlugin Controller", func() {
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
Expect(dp.Spec.InitImage == initimage).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("dsa", &devicepluginv1.DsaDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -143,4 +143,8 @@ var _ = Describe("FpgaDevicePlugin Controller", func() {
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
Expect(dp.Spec.InitImage == initimage).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("fpga", &devicepluginv1.FpgaDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -147,4 +147,8 @@ var _ = Describe("GpuDevicePlugin Controller", func() {
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
Expect(dp.Spec.InitImage == initimage).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("gpu", &devicepluginv1.GpuDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -166,4 +166,8 @@ var _ = Describe("IaaDevicePlugin Controller", func() {
|
||||
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("iaa", &devicepluginv1.IaaDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -177,4 +177,8 @@ var _ = Describe("QatDevicePlugin Controller", func() {
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
Expect(dp.Spec.InitImage == initimage).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("qat", &devicepluginv1.QatDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -149,4 +149,8 @@ var _ = Describe("SgxDevicePlugin Controller", func() {
|
||||
Expect(dp.Spec.Image == image).To(BeTrue())
|
||||
Expect(dp.Spec.InitImage == initimage).To(BeTrue())
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
CleanupAfter("sgx", &devicepluginv1.SgxDevicePlugin{})
|
||||
})
|
||||
})
|
||||
|
@ -135,6 +135,14 @@ func up() {
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
|
||||
func CleanupAfter(name string, cr client.Object) {
|
||||
namespacedName := types.NamespacedName{Namespace: ns, Name: name + "deviceplugin-test"}
|
||||
|
||||
if err := k8sClient.Get(ctx, namespacedName, cr); err == nil {
|
||||
Expect(k8sClient.Delete(ctx, cr)).Should(Succeed())
|
||||
}
|
||||
}
|
||||
|
||||
func down() {
|
||||
time.Sleep(time.Second)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user