1
0
mirror of https://github.com/pravets/oscript-images.git synced 2025-11-25 22:32:37 +02:00

feat: добавлен тест сборки onescript

This commit is contained in:
Iosif Pravets
2025-06-09 21:10:20 +00:00
committed by GitHub
parent 012e1f6f1d
commit 3f8ea26989

31
tests/test-oscript.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
set -e
if [ -z "${CI-}" ]; then
echo "The script is not running in CI"
source .env
else
echo "The script is running in CI"
fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/../tools/assert.sh"
test_oscript_is_running() {
log_header "Test :: oscript is running"
local expected actual
expected="1Script Execution Engine"
actual=$(docker run --rm $DOCKER_REGISTRY_URL/${DOCKER_LOGIN}/oscript:$OSCRIPT_VERSION)
if assert_contain "$actual" "$expected"; then
log_success "oscript is running test passed"
else
log_failure "oscript is running test failed"
fi
}
# test calls
test_oscript_is_running