Files
donotpassgo/src/test.sh

37 lines
839 B
Bash
Raw Normal View History

2026-04-03 00:22:36 -04:00
#!/bin/bash
set -eo pipefail
2026-04-03 15:41:13 -04:00
if [ "$TEST_LIBRARY" == "none" ]; then
2026-04-03 00:22:36 -04:00
echo "[INFO] test-library input not set, skipping unit tests.";
exit 0;
fi
echo "[INFO] running unit tests";
2026-04-03 15:41:13 -04:00
if [ "$TEST_LIBRARY" == "standard" ]; then
2026-04-03 00:22:36 -04:00
if go test ./...; then
echo "[INFO] unit tests passed!";
exit 0;
else
2026-04-03 15:41:13 -04:00
if [ "$TEST_FAIL" == "yes" ]; then
2026-04-03 00:22:36 -04:00
echo "[FATAL] unit tests failed!";
exit 1;
else
echo "[INFO] unit tests failed!";
fi
fi
fi
2026-04-03 15:41:13 -04:00
if [ "$TEST_LIBRARY" == "ginkgo" ]; then
2026-04-03 00:22:36 -04:00
if ginkgo ./...; then
echo "[INFO] unit tests passed!";
exit 0;
else
2026-04-03 15:41:13 -04:00
if [ "$TEST_FAIL" == "yes" ]; then
2026-04-03 00:22:36 -04:00
echo "[FATAL] unit tests failed!";
exit 1;
else
echo "[INFO] unit tests failed!";
fi
fi
fi