From c70b6e72a78d32a001cf4add47daf711f954c009 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 8 Jan 2025 14:18:50 +0100 Subject: [PATCH] test: ensure unstaged changes preserved --- tests/integration/app_new.bats | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/app_new.bats b/tests/integration/app_new.bats index f55f2052..da7e5b10 100644 --- a/tests/integration/app_new.bats +++ b/tests/integration/app_new.bats @@ -98,9 +98,6 @@ teardown(){ assert_success assert_output --partial 'foo' - assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" - assert_equal "$(_git_status)" "?? foo" - run $ABRA app new "$TEST_RECIPE" \ --no-input \ --server "$TEST_SERVER" \ @@ -108,6 +105,9 @@ teardown(){ assert_failure assert_output --partial 'locally unstaged changes' + assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" + assert_equal "$(_git_status)" "?? foo" + run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE/foo" assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" } @@ -121,9 +121,6 @@ teardown(){ assert_success assert_output --partial 'foo' - assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" - assert_equal "$(_git_status)" "?? foo" - run $ABRA app new "$TEST_RECIPE" \ --no-input \ --chaos \ @@ -132,6 +129,9 @@ teardown(){ assert_success assert_exists "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" + assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" + assert_equal "$(_git_status)" "?? foo" + run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE/foo" assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" }