Skip to content

Commit

Permalink
Clean existings vms in BeforeEach allows the reporter to dump the con…
Browse files Browse the repository at this point in the history
…tent of the launcher pod.

In case of failures, AfterEach cleaned the vms, so the reporter was not able to collect the logs of the launcher.

Signed-off-by: Federico Paolinelli <[email protected]>
  • Loading branch information
fedepaol committed Oct 18, 2019
1 parent d59d945 commit ae47b48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/vmi_multus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var _ = Describe("Multus", func() {
},
}

AfterEach(func() {
BeforeEach(func() {
// Multus tests need to ensure that old VMIs are gone
Expect(virtClient.RestClient().Delete().Namespace(tests.NamespaceTestDefault).Resource("virtualmachineinstances").Do().Error()).To(Succeed())
Expect(virtClient.RestClient().Delete().Namespace(tests.NamespaceTestAlternative).Resource("virtualmachineinstances").Do().Error()).To(Succeed())
Expand Down Expand Up @@ -589,7 +589,7 @@ var _ = Describe("SRIOV", func() {
Expect(result.Error()).NotTo(HaveOccurred())
})

AfterEach(func() {
BeforeEach(func() {
// Multus tests need to ensure that old VMIs are gone
Expect(virtClient.RestClient().Delete().Namespace(tests.NamespaceTestDefault).Resource("virtualmachineinstances").Do().Error()).To(Succeed())
Expect(virtClient.RestClient().Delete().Namespace(tests.NamespaceTestAlternative).Resource("virtualmachineinstances").Do().Error()).To(Succeed())
Expand Down

0 comments on commit ae47b48

Please sign in to comment.