Skip to content

Commit

Permalink
fix: integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nushio committed Jun 8, 2022
1 parent b09dd6b commit fe398de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ jobs:
params:
- {
test_dir: "functions_single_site",
validation_app_dir: "public/_app/manifest.json",
validation_app_dir: "public/_app/immutable/pages/index.svelte-*.js",
validation_compute_dir: "functions/sveltekit/index.js",
nested_dir: ".",
}
- {
test_dir: "nested_app_dirs",
validation_app_dir: "public/_app/manifest.json",
validation_app_dir: "public/_app/immutable/pages/index.svelte-*.js",
validation_compute_dir: "functions/sveltekit/index.js",
nested_dir: "app",
}
- {
test_dir: "run_service_id",
validation_app_dir: "public/_app/manifest.json",
validation_app_dir: "public/_app/immutable/pages/index.svelte-*.js",
validation_compute_dir: "functions/cloudrun/index.js",
nested_dir: ".",
}
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/integration-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ IFS=$'\n\t'
#
# Usage:
#
# tests/integration/integration-test.bash "functions_single_site" "public/_app/manifest.json" "functions/sveltekit/index.js" "."
# tests/integration/integration-test.bash "nested_app_dirs" "public/_app/manifest.json" "functions/sveltekit/index.js" "app"
# tests/integration/integration-test.bash "run_service_id" "public/_app/manifest.json" "functions/cloudrun/index.js" "."
# tests/integration/integration-test.bash "functions_single_site" "public/_app/immutable/pages/index.svelte-*.js" "functions/sveltekit/index.js" "."
# tests/integration/integration-test.bash "nested_app_dirs" "public/_app/immutable/pages/index.svelte-*.js" "functions/sveltekit/index.js" "app"
# tests/integration/integration-test.bash "run_service_id" "public/_app/immutable/pages/index.svelte-*.js" "functions/cloudrun/index.js" "."

SOURCE_DIR="$1"
PUBLIC_FILENAME="$2"
Expand All @@ -25,7 +25,7 @@ SCRIPT_PATH=$(dirname "$(realpath -s "$0")")
TEST_DIR="$(mktemp -dt "svelte-adapter-firebase-test-${SOURCE_DIR}-XXXX")"

# Cleanup files on exit
trap 'echo "${INDICATOR}Exiting, removing ${TEST_DIR}" && rm -rf -- "$TEST_DIR"' EXIT
# trap 'echo "${INDICATOR}Exiting, removing ${TEST_DIR}" && rm -rf -- "$TEST_DIR"' EXIT

echo "${INDICATOR}TEST_DIR: ${TEST_DIR}"
echo "${INDICATOR}PWD: ${PWD}"
Expand Down Expand Up @@ -57,7 +57,7 @@ echo "${INDICATOR}Build Kit todos site"
npm run build

# Check ${PUBLIC_FILENAME} exists
if [ ! -f "${TEST_DIR}/${NESTED_APP_DIR}/${PUBLIC_FILENAME}" ]; then
if ! [ $(ls ${TEST_DIR}/${NESTED_APP_DIR}/${PUBLIC_FILENAME} 2> /dev/null) ] ; then
echo "${INDICATOR}FAILED to find ${TEST_DIR}/${NESTED_APP_DIR}/${PUBLIC_FILENAME}"
exit 1
fi
Expand Down

0 comments on commit fe398de

Please sign in to comment.