Misc cleanups (#899)

* apiclient: stop logging short-term cookies

* testing: unset KOPIA_PASSWORD in tests, which disrupts subprocesses
This commit is contained in:
Jarek Kowalski
2021-03-19 21:57:15 -07:00
committed by GitHub
parent 3a94c16678
commit 175ca8bd7a
2 changed files with 4 additions and 1 deletions

View File

@@ -199,7 +199,7 @@ func (t loggingTransport) RoundTrip(req *http.Request) (*http.Response, error) {
return nil, errors.Wrap(err, "round-trip error")
}
log(req.Context()).Debugf("%v %v took %v and returned %v with cookies %v", req.Method, req.URL, clock.Since(t0), resp.Status, resp.Cookies())
log(req.Context()).Debugf("%v %v took %v and returned %v", req.Method, req.URL, clock.Since(t0), resp.Status)
return resp, nil
}

View File

@@ -78,6 +78,9 @@ func NewCLITest(t *testing.T) *CLITest {
t.Skip()
}
// unset environment variables that disrupt tests when passed to subprocesses.
os.Unsetenv("KOPIA_PASSWORD")
configDir := testutil.TempDirectory(t)
cleanName := strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(