#!/bin/bash

set -e

# pre-requisites
if ! command -v go >/dev/null 2>&1 ; then
  echo "Go is not installed."
  exit 1
fi

# variables
SMOKE_TESTS_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."

# run smoke tests
pushd "${SMOKE_TESTS_ROOT}" > /dev/null
  go run github.com/onsi/ginkgo/v2/ginkgo -r --succinct --poll-progress-after=300s "$@"
popd > /dev/null
