diff --git a/cmd/datamon/cmd/cli_test.go b/cmd/datamon/cmd/cli_test.go index 38e95bb5..71358d6b 100644 --- a/cmd/datamon/cmd/cli_test.go +++ b/cmd/datamon/cmd/cli_test.go @@ -139,13 +139,21 @@ func setupTests(t *testing.T) func() { os.RemoveAll(destinationDir) deleteBucket(ctx, t, client, bucketMeta) deleteBucket(ctx, t, client, bucketBlob) - params = paramsT{} } return cleanup } func runCmd(t *testing.T, cmd []string, intentMsg string, expectError bool) { fatalCallsBefore := exitMocks.fatalCalls + bucketMeta := params.repo.MetadataBucket + bucketBlob := params.repo.BlobBucket + contributorEmail := params.repo.ContributorEmail + contributorName := params.repo.ContributorName + params = paramsT{} + params.repo.MetadataBucket = bucketMeta + params.repo.BlobBucket = bucketBlob + params.repo.ContributorEmail = contributorEmail + params.repo.ContributorName = contributorName rootCmd.SetArgs(cmd) require.NoError(t, rootCmd.Execute(), "error executing '"+strings.Join(cmd, " ")+"' : "+intentMsg) if expectError { @@ -762,9 +770,6 @@ func TestDiffBundle(t *testing.T) { "--repo", repo1, "--concurrency-factor", "20", }, "upload bundle at "+dirPathStr(t, files[0]), false) - // todo: zero out params in runCmd(), not cleanup() - // params = paramsT{} << this breaks getting bundle id from label - params.bundle.ID = "" r, w, err := os.Pipe() if err != nil { panic(err)