Skip to content

Commit

Permalink
fix: Reset disks and force remove vm after suite execution (#846)
Browse files Browse the repository at this point in the history
Issue #, if available:

*Description of changes: Force remove vm and clean disks. This gives a
chance to recover from builkit failures caused by non-existent uuid
files

*Testing done:*



- [x] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Shubharanshu Mahapatra <[email protected]>
  • Loading branch information
Shubhranshu153 authored Mar 11, 2024
1 parent 9f0953d commit c2363b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions e2e/vm/vm_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func TestVM(t *testing.T) {
time.Sleep(1 * time.Second)
command.New(o, "vm", "remove", "-f").WithoutCheckingExitCode().WithTimeoutInSeconds(20).Run()
time.Sleep(1 * time.Second)
resetDisks(o, *e2e.Installed)
}, func() {})

ginkgo.AfterEach(func() {
Expand Down
5 changes: 3 additions & 2 deletions e2e/vm/vm_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ func TestVM(t *testing.T) {
}, func(_ []byte) {})

ginkgo.SynchronizedAfterSuite(func() {
command.New(o, "vm", "stop").WithTimeoutInSeconds(90).Run()
command.New(o, "vm", "remove").WithTimeoutInSeconds(60).Run()
command.New(o, "vm", "stop", "-f").WithTimeoutInSeconds(90).Run()
command.New(o, "vm", "remove", "-f").WithTimeoutInSeconds(60).Run()
resetDisks(o, *e2e.Installed)
}, func() {})

ginkgo.Describe("", func() {
Expand Down

0 comments on commit c2363b1

Please sign in to comment.