Move test goldens to testdata/ directory to be more idiomatic, and add assertion that they're all actively being used by the tests (#154)

* Move golden files to testdata dir

* Add assertion that requires that all goldens are used

* Add map init so the map is non-nil

* Add print to confirm that tests finished running

* Remove colon so that this doesn't match against gotestsum looking for the substring "panic:", which can happen depending on how stdout is buffer

* Revert "Remove colon so that this doesn't match against gotestsum looking for the substring "panic:", which can happen depending on how stdout is buffer"

This reverts commit b44e53a17b.
This commit is contained in:
David Dworken 2023-12-21 17:06:46 -08:00 committed by GitHub
parent 516ee59791
commit 88f1c0168e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
103 changed files with 26 additions and 2 deletions

View File

@ -7,7 +7,7 @@ test:
ftest:
go clean -testcache
TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 gotestsum --packages ./... --rerun-fails=0 --format testname -- -p 1 -run "$(FILTER)" -timeout 60m
HISHTORY_FILTERED_TEST=1 TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 gotestsum --packages ./... --rerun-fails=0 --format testname -- -p 1 -run "$(FILTER)" -timeout 60m
acttest:
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64

View File

@ -53,6 +53,9 @@ func TestMain(m *testing.M) {
// Start the tests
m.Run()
// Teardown
testutils.AssertAllGoldensUsed()
}
var shellTesters []shellTester = []shellTester{bashTester{}, zshTester{}}

Some files were not shown because too many files have changed in this diff Show More