[cli] Make tests not be sensitive to env

commit 5315ff82632419805df5b25b6a7f36d899d57988 added these tests that
run shac nearly end-to-end, including automatic selection of reporting
mechanism. The reporting mechanism selection is sensitive to the
environment and in particular is somewhat picky about how the ResultDB
environment is set up, so the tests fail if they're run on a builder
with ResultDB enabled but without the process being wrapped by `rdb
stream`: https://ci.chromium.org/b/8768055331277189409

Change-Id: Idc006375834a225d207413a7962baad1083a8abf
Reviewed-on: https://fuchsia-review.googlesource.com/c/shac-project/shac/+/927713
Fuchsia-Auto-Submit: Oliver Newman <olivernewman@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Anthony Fandrianto <atyfto@google.com>
diff --git a/internal/cli/main_test.go b/internal/cli/main_test.go
index 9b72aa0..126d9be 100644
--- a/internal/cli/main_test.go
+++ b/internal/cli/main_test.go
@@ -74,7 +74,14 @@
 }
 
 func TestMainErr(t *testing.T) {
-	t.Parallel()
+	// Override various env vars probed by `reporting.Get()` to prevent
+	// automatic selection of the reporter, which can lead to inconsistent
+	// behavior depending on the environment.
+	t.Setenv("LUCI_CONTEXT", "")
+	t.Setenv("GITHUB_RUN_ID", "")
+	t.Setenv("VSCODE_GIT_IPC_HANDLE", "")
+	t.Setenv("TERM", "dumb")
+
 	data := map[string]func(t *testing.T) (args []string, wantErr string){
 		"no shac.star files": func(t *testing.T) ([]string, string) {
 			root := t.TempDir()