Skip to content

Commit

Permalink
test fix : remove terraform versions prior to 0.11.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaumoron committed Oct 4, 2023
1 parent 5db1cd2 commit 6f60a1a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions test/test_install_and_use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ tests__kv=(
"$(tfenv list-remote | grep 'rc' | head -n 1),latest:rc"
"$(tfenv list-remote | grep '^0\.11\.' | head -n 1),latest:^0.11."
'0.11.15-oci,0.11.15-oci'
'0.8.8,latest:^0.8'
'0.7.13,0.7.13'
'0.11.14,latest:^0.11'
'0.11.9,0.11.9'
'0.14.6,v0.14.6'
);

Expand Down
10 changes: 4 additions & 6 deletions test/test_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ declare -a errors=();
log 'info' '### List local versions';
cleanup || log 'error' "Cleanup failed?!";

for v in 0.7.2 0.7.13 0.9.1 0.9.2 v0.9.11 0.14.6; do
for v in 0.11.9 0.11.11 v0.11.13 0.14.6; do
log 'info' "## Installing version ${v} to construct list";
tfenv install "${v}" \
&& log 'debug' "Install of version ${v} succeeded" \
Expand All @@ -71,11 +71,9 @@ log 'info' '## Comparing "tfenv list" with default set';
result="$(tfenv list)";
expected="$(cat << EOS
* 0.14.6 (set by $(tfenv version-file))
0.9.11
0.9.2
0.9.1
0.7.13
0.7.2
0.11.13
0.11.11
0.11.9
EOS
)";

Expand Down
12 changes: 6 additions & 6 deletions test/test_symlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ ln -s "${PWD}"/bin/* "${TFENV_BIN_DIR}";

cleanup || log 'error' 'Cleanup failed?!';

log 'info' '## Installing 0.8.2';
${TFENV_BIN_DIR}/tfenv install 0.8.2 || error_and_proceed 'Install failed';
log 'info' '## Installing 0.11.14';
${TFENV_BIN_DIR}/tfenv install 0.11.14 || error_and_proceed 'Install failed';

log 'info' '## Using 0.8.2';
${TFENV_BIN_DIR}/tfenv use 0.8.2 || error_and_proceed 'Use failed';
log 'info' '## Using 0.11.14';
${TFENV_BIN_DIR}/tfenv use 0.11.14 || error_and_proceed 'Use failed';

log 'info' '## Check-Version for 0.8.2';
check_active_version 0.8.2 || error_and_proceed 'Version check failed';
log 'info' '## Check-Version for 0.11.14';
check_active_version 0.11.14 || error_and_proceed 'Version check failed';

if [ "${#errors[@]}" -gt 0 ]; then
log 'warn' '===== The following symlink tests failed =====';
Expand Down
8 changes: 4 additions & 4 deletions test/test_uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ log 'info' '### Test Suite: Uninstall Local Versions';
cleanup || log 'error' 'Cleanup failed?!';

tests__keywords=(
'0.9.1'
'0.11.10'
'0.11.15-oci'
'latest'
'latest:^0.8'
'latest:^0.11'
'v0.14.6'
);

tests__versions=(
'0.9.1'
'0.11.10'
'0.11.15-oci'
"$(tfenv list-remote | head -n1)"
"$(tfenv list-remote | grep -e "^0.8" | head -n1)"
"$(tfenv list-remote | grep -e "^0.11" | head -n1)"
'0.14.6'
);

Expand Down
2 changes: 1 addition & 1 deletion test/test_use_minrequired.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ cleanup || log 'error' 'Cleanup failed?!';

log 'info' '### Install min-required normal version (#.#.#)';

minv='0.8.0';
minv='0.11.9';

echo "terraform {
required_version = \">=${minv}\"
Expand Down

0 comments on commit 6f60a1a

Please sign in to comment.