diff options
Diffstat (limited to '.extras/test-logic.sh')
| -rw-r--r-- | .extras/test-logic.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.extras/test-logic.sh b/.extras/test-logic.sh index 20041a9..81a0841 100644 --- a/.extras/test-logic.sh +++ b/.extras/test-logic.sh @@ -30,6 +30,20 @@ bad() { echo " FAIL: $1"; ((fail++)); return 0; } # Placeholder assertion so this file runs before any logic exists. ok "script sources without executing main" +# --- version selection ------------------------------------------------------ +SBO_TREE_CURRENT="/trees/current" +SBO_TREE_STABLE="/trees/stable" +IMAGE_CURRENT="sbo-testbuild:current" +IMAGE_STABLE="sbo-testbuild:15.0" + +VERSION_ID="current"; select_version_paths +[[ "$ACTIVE_TREE" == "/trees/current" ]] && ok "current -> current tree" || bad "current tree wrong: [$ACTIVE_TREE]" +[[ "$ACTIVE_IMAGE" == "sbo-testbuild:current" ]] && ok "current -> current image" || bad "current image wrong: [$ACTIVE_IMAGE]" + +VERSION_ID="15.0"; select_version_paths +[[ "$ACTIVE_TREE" == "/trees/stable" ]] && ok "15.0 -> stable tree" || bad "stable tree wrong: [$ACTIVE_TREE]" +[[ "$ACTIVE_IMAGE" == "sbo-testbuild:15.0" ]] && ok "15.0 -> stable image" || bad "stable image wrong: [$ACTIVE_IMAGE]" + echo echo "$pass passed, $fail failed" [[ $fail -eq 0 ]] || exit 1 |
