From 3f8ea26989d38d2d8cde6316ba76a97b952bd0ba Mon Sep 17 00:00:00 2001 From: Iosif Pravets Date: Mon, 9 Jun 2025 21:10:20 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=82=D0=B5=D1=81=D1=82=20=D1=81=D0=B1=D0=BE?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20onescript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test-oscript.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 tests/test-oscript.sh diff --git a/tests/test-oscript.sh b/tests/test-oscript.sh new file mode 100755 index 0000000..a5c65df --- /dev/null +++ b/tests/test-oscript.sh @@ -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 \ No newline at end of file