#!/usr/bin/env bash

set -euo pipefail

echo "Running the test script ci/custom_job_example/test.sh"

echo "Args: $@"
echo "TEST_ENV: ${TEST_ENV:-}"

if [[ "$@" != "arg1 arg2 arg3" ]]; then
  echo "Args passed ($@) to the test.sh is not expected 'args'"
  exit 10
fi

if [[ "${TEST_ENV:-}" != "TEST_VALUE" ]]; then
  echo "Expected \$TEST_ENV == TEST_VALUE but was '${TEST_ENV:-}'"
  exit 10
fi

exit 0
