Archived
Harden read-only provider with tests, docs, and CI
This commit is contained in:
+13
-6
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user