From e945658baf090e6be987edaa2e35a907187156a7 Mon Sep 17 00:00:00 2001 From: Eric Promislow Date: Wed, 30 Aug 2023 11:48:08 -0700 Subject: [PATCH 1/2] Add a bats test to verify presence/absence of apphome/snapshots. Signed-off-by: Eric Promislow --- .../containers/factory-reset-snapshots.bats | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 bats/tests/containers/factory-reset-snapshots.bats diff --git a/bats/tests/containers/factory-reset-snapshots.bats b/bats/tests/containers/factory-reset-snapshots.bats new file mode 100644 index 00000000000..e1bc294bea1 --- /dev/null +++ b/bats/tests/containers/factory-reset-snapshots.bats @@ -0,0 +1,29 @@ +load '../helpers/load' + +@test 'factory reset' { + delete_all_snapshots + factory_reset +} + +@test 'Start up Rancher Desktop with a snapshots subdirectory' { + start_container_engine + wait_for_container_engine + wait_for_backend +} + +@test "Verify the snapshot dir isn't deleted on factory-reset" { + rdctl shutdown + rdctl snapshot create shortlived-snapshot + rdctl factory-reset + assert_not_exists "$PATH_APP_HOME/rd-engine.json" + assert_exists "$PATH_SNAPSHOTS" + run ls -A "$PATH_SNAPSHOTS" + assert_output + test -n "$output" +} + +@test 'Verify factory-reset deletes an empty snapshots directory' { + rdctl snapshot delete shortlived-snapshot + rdctl factory-reset + assert_not_exists "$PATH_APP_HOME" +} From ece52fb38ceb9d3161a3fe90209c433048a6572a Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Fri, 20 Oct 2023 21:27:15 -0700 Subject: [PATCH 2/2] Add 'shortlived' to spelling expect.txt Signed-off-by: Jan Dubois --- .github/actions/spelling/expect.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 21b467e13f5..f443e889a1b 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -670,6 +670,7 @@ sharkanodo shasta shazbat shortkey +shortlived showmuted sigch sigevent