aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-10-30 09:37:37 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-10-30 09:37:37 -0400
commit5f29a25a76f9dfb06a97e921f1d428c683970831 (patch)
treecd4fc6bb99ee2376600a7bfc96c3bbbafaf02700 /tests
parent7a77598e0355c8d1df97745f1678363f050fc607 (diff)
downloadstasis-5f29a25a76f9dfb06a97e921f1d428c683970831.tar.gz
Update RT tests to use run_command function
Diffstat (limited to 'tests')
-rw-r--r--tests/rt_generic.sh20
-rw-r--r--tests/rt_generic_based_on.sh15
2 files changed, 19 insertions, 16 deletions
diff --git a/tests/rt_generic.sh b/tests/rt_generic.sh
index d19a46b..674f6f0 100644
--- a/tests/rt_generic.sh
+++ b/tests/rt_generic.sh
@@ -1,5 +1,4 @@
-set -e
-
+#!/usr/bin/env bash
here="$(dirname ${BASH_SOURCE[0]})"
source $here/setup.sh
@@ -7,23 +6,26 @@ TEST_NAME=generic
PYTHON_VERSIONS=(
3.11
)
+
setup_workspace "$TEST_NAME"
-install_stasis
+run_command install_stasis
for py_version in "${PYTHON_VERSIONS[@]}"; do
- run_stasis --python "$py_version" \
+ run_command run_stasis --python "$py_version" \
--no-docker \
--no-artifactory \
- "$TOPDIR"/"$TEST_NAME".ini
+ "$TEST_DATA"/"$TEST_NAME".ini
done
check_output_add "(null)"
-check_output_stasis_dir stasis/*/output
+run_command check_output_stasis_dir stasis/*/output
check_output_reset
# NOTE: indexer default output directory is "output"
check_output_add "(null)"
-run_stasis_indexer stasis
-check_output_indexed_dir output
+run_command run_stasis_indexer stasis
+run_command check_output_indexed_dir output
check_output_reset
-teardown_workspace "$TEST_NAME"
+run_command assert_file_contains "$LOGFILE_STASIS" "USE EXTERNAL" "External packages should have been used"
+
+teardown_workspace "$TEST_NAME" \ No newline at end of file
diff --git a/tests/rt_generic_based_on.sh b/tests/rt_generic_based_on.sh
index 7ca11ce..7d78399 100644
--- a/tests/rt_generic_based_on.sh
+++ b/tests/rt_generic_based_on.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
here="$(dirname ${BASH_SOURCE[0]})"
source $here/setup.sh
@@ -6,24 +7,24 @@ PYTHON_VERSIONS=(
3.11
)
setup_workspace "$TEST_NAME"
-install_stasis
+run_command install_stasis
-ln -s "$TOPDIR"/"$TEST_NAME".yml
+ln -s "$TEST_DATA"/"$TEST_NAME".yml
for py_version in "${PYTHON_VERSIONS[@]}"; do
- run_stasis --python "$py_version" \
+ run_command run_stasis --python "$py_version" \
--no-docker \
--no-artifactory \
- "$TOPDIR"/"$TEST_NAME".ini
+ "$TEST_DATA"/"$TEST_NAME".ini
done
check_output_add "(null)"
-check_output_stasis_dir stasis/*/output
+run_command check_output_stasis_dir stasis/*/output
check_output_reset
# NOTE: indexer default output directory is "output"
check_output_add "(null)"
-run_stasis_indexer stasis
-check_output_indexed_dir output
+run_command run_stasis_indexer stasis
+run_command check_output_indexed_dir output
check_output_reset
teardown_workspace "$TEST_NAME"