Harden read-only provider with tests, docs, and CI

This commit is contained in:
beatz174-bit
2026-04-21 14:39:36 +10:00
parent cf47a6ed48
commit 6cc1b206dc
24 changed files with 711 additions and 246 deletions
+13 -6
View File
@@ -1,14 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
echo "[check] Running gofmt"
echo "[check] verifying gofmt"
files="$(git ls-files '*.go')"
if [[ -n "$files" ]]; then
# shellcheck disable=SC2086
gofmt -w $files
if [[ -n "${files}" ]]; then
unformatted="$(gofmt -l ${files})"
if [[ -n "${unformatted}" ]]; then
echo "[check][error] gofmt reported unformatted files:" >&2
echo "${unformatted}" >&2
exit 1
fi
fi
echo "[check] Running go test"
echo "[check] running go vet"
go vet ./...
echo "[check] running go test"
go test ./...
echo "[check] Completed"
echo "[check] complete"
+3 -3
View File
@@ -12,8 +12,8 @@ if [[ -z "${DYNU_API_KEY:-}" ]]; then
fi
if [[ -z "${DYNU_DOMAIN:-}" ]]; then
echo "[testacc][info] DYNU_DOMAIN is not set; running baseline acceptance scaffolding"
echo "[testacc][warn] DYNU_DOMAIN not set; domain-specific acceptance tests will skip"
fi
echo "[testacc] Running acceptance tests"
go test ./internal/provider -run TestAcc -count=1
echo "[testacc] running acceptance tests"
go test ./internal/provider -run '^TestAcc' -count=1 -v