Skip to content

Commit

Permalink
test: set catalog feature for unimpacted tests
Browse files Browse the repository at this point in the history
To verify there's no breakage from the catalog, set the catalog feature
flag for several test files that don't use the catalog at all.
  • Loading branch information
mkenigs committed May 21, 2024
1 parent 3c3529c commit 0c7b11f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cli/tests/auth.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ load test_support.bash

setup_file() {
common_file_setup
export FLOX_FEATURES_USE_CATALOG=true
export _FLOX_USE_CATALOG_MOCK="${BATS_FILE_TMPDIR}/empty-responses.json"
echo "[]" > "$_FLOX_USE_CATALOG_MOCK"
}

teardown_file() {
unset FLOX_FEATURES_USE_CATALOG
rm "$_FLOX_USE_CATALOG_MOCK"
unset _FLOX_USE_CATALOG_MOCK
}

# ---------------------------------------------------------------------------- #
Expand Down
13 changes: 13 additions & 0 deletions cli/tests/delete.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ load test_support.bash

# ---------------------------------------------------------------------------- #

setup_file() {
common_file_setup
export FLOX_FEATURES_USE_CATALOG=true
export _FLOX_USE_CATALOG_MOCK="${BATS_FILE_TMPDIR}/empty-responses.json"
echo "[]" > "$_FLOX_USE_CATALOG_MOCK"
}

teardown_file() {
unset FLOX_FEATURES_USE_CATALOG
rm "$_FLOX_USE_CATALOG_MOCK"
unset _FLOX_USE_CATALOG_MOCK
}

# Helpers for project based tests.

project_setup() {
Expand Down
13 changes: 13 additions & 0 deletions cli/tests/edit.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ load test_support.bash

# ---------------------------------------------------------------------------- #

setup_file() {
common_file_setup
export FLOX_FEATURES_USE_CATALOG=true
export _FLOX_USE_CATALOG_MOCK="${BATS_FILE_TMPDIR}/empty-responses.json"
echo "[]" > "$_FLOX_USE_CATALOG_MOCK"
}

teardown_file() {
unset FLOX_FEATURES_USE_CATALOG
rm "$_FLOX_USE_CATALOG_MOCK"
unset _FLOX_USE_CATALOG_MOCK
}

# Helpers for project based tests.

project_setup() {
Expand Down
13 changes: 13 additions & 0 deletions cli/tests/usage.bats
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ load test_support.bash

# ---------------------------------------------------------------------------- #

setup_file() {
common_file_setup
export FLOX_FEATURES_USE_CATALOG=true
export _FLOX_USE_CATALOG_MOCK="${BATS_FILE_TMPDIR}/empty-responses.json"
echo "[]" > "$_FLOX_USE_CATALOG_MOCK"
}

teardown_file() {
unset FLOX_FEATURES_USE_CATALOG
rm "$_FLOX_USE_CATALOG_MOCK"
unset _FLOX_USE_CATALOG_MOCK
}

setup() {
common_test_setup
}
Expand Down
8 changes: 8 additions & 0 deletions tests/cross-system.bats
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,19 @@ setup_file() {
)"

export OWNER="floxEM"

export FLOX_FEATURES_USE_CATALOG=true
export _FLOX_USE_CATALOG_MOCK="${BATS_FILE_TMPDIR}/empty-responses.json"
echo "[]" > "$_FLOX_USE_CATALOG_MOCK"
}

teardown_file() {
"$FLOX_BIN" config --delete floxhub_url
unset FLOX_FLOXHUB_TOKEN

unset FLOX_FEATURES_USE_CATALOG
rm "$_FLOX_USE_CATALOG_MOCK"
unset _FLOX_USE_CATALOG_MOCK
}

# ---------------------------------------------------------------------------- #
Expand Down

0 comments on commit 0c7b11f

Please sign in to comment.