restructure and adding functionality

This commit is contained in:
2026-04-03 00:22:36 -04:00
parent d26348d065
commit 4a98d66b24
6 changed files with 128 additions and 77 deletions

37
src/test.sh Normal file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
set -eo pipefail
if [[ "$TEST_LIBRARY" == "none" ]]; then
echo "[INFO] test-library input not set, skipping unit tests.";
exit 0;
fi
echo "[INFO] running unit tests";
if [[ "$TEST_LIBRARY" == "standard" ]]; then
if go test ./...; then
echo "[INFO] unit tests passed!";
exit 0;
else
if [[ "$TEST_FAIL" == "yes" ]]; then
echo "[FATAL] unit tests failed!";
exit 1;
else
echo "[INFO] unit tests failed!";
fi
fi
fi
if [[ "$TEST_LIBRARY" == "ginkgo" ]]; then
if ginkgo ./...; then
echo "[INFO] unit tests passed!";
exit 0;
else
if [[ "$TEST_FAIL" == "yes" ]]; then
echo "[FATAL] unit tests failed!";
exit 1;
else
echo "[INFO] unit tests failed!";
fi
fi
fi