Skip to content

Commit bb9f014

Browse files
Claudio Dinizpsousa50
Claudio Diniz
authored andcommittedMar 22, 2023
Segragate dbt versions to test by target
1 parent 09be28e commit bb9f014

3 files changed

+46
-4
lines changed
 

‎run-all-integration-tests.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ fi
99

1010
PROFILE="$1"
1111

12-
./run-tests-on-dbt-version.sh "run-integration-tests" "$PROFILE" "1.3.3"
13-
./run-tests-on-dbt-version.sh "run-integration-tests" "$PROFILE" "1.4.5"
12+
# Source the script that contains the run_tests function and versions
13+
source ./run-tests-helper.sh
14+
15+
run_tests "run-integration-tests" "$PROFILE"

‎run-all-jaffle-shop-tests.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#!/bin/bash
22

3+
set -e
4+
35
if [ -z "$1" ]; then
46
echo 'Please provide profile name'
57
exit 1
68
fi
79

810
PROFILE="$1"
911

10-
./run-tests-on-dbt-version.sh "run-jaffle-shop-tests" "$PROFILE" "1.3.3"
11-
./run-tests-on-dbt-version.sh "run-jaffle-shop-tests" "$PROFILE" "1.4.0"
12+
# Source the script that contains the run_tests function and versions
13+
source ./run-tests-helper.sh
14+
15+
run_tests "run-jaffle-shop-tests" "$PROFILE"

‎run-tests-helper.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
function run_tests() {
4+
local TEST_SUITE=$1
5+
local PROFILE=$2
6+
7+
if [ "$PROFILE" == "postgres" ]; then
8+
VERSIONS="1.3.3 1.4.0"
9+
elif [ "$PROFILE" == "bigquery" ]; then
10+
VERSIONS="1.3.2"
11+
elif [ "$PROFILE" == "snowflake" ]; then
12+
VERSIONS="1.3.1"
13+
else
14+
echo "Invalid profile name: $PROFILE"
15+
exit 1
16+
fi
17+
18+
if [ -z "$TEST_SUITE" ]; then
19+
echo 'Please provide test suite name'
20+
exit 1
21+
fi
22+
23+
if [ -z "$PROFILE" ]; then
24+
echo 'Please provide profile name'
25+
exit 1
26+
fi
27+
28+
if [ -z "$VERSIONS" ]; then
29+
echo 'Please provide versions to test'
30+
exit 1
31+
fi
32+
33+
for DBT_VERSION in $VERSIONS; do
34+
./run-tests-on-dbt-version.sh "$TEST_SUITE" "$PROFILE" "$DBT_VERSION"
35+
done
36+
}

0 commit comments

Comments
 (0)
Please sign in to comment.