You've already forked oscript-images
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:
31
tests/test-oscript.sh
Executable file
31
tests/test-oscript.sh
Executable 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
|
||||
Reference in New Issue
Block a user