Plugins: Make file system path handling in tests OS agnostic (#79651)

* make path handling OS agnostic

* PR feedback

* fix input for test case
This commit is contained in:
Will Browne
2023-12-19 11:01:48 +01:00
committed by GitHub
parent 8cb351e54a
commit ef60c90dfa
6 changed files with 19 additions and 14 deletions

View File

@@ -47,6 +47,8 @@ func TestHTTPLoggerMiddleware(t *testing.T) {
f, err := os.CreateTemp("", "example_*.har")
require.NoError(t, err)
defer func() {
err = f.Close()
require.NoError(t, err)
err := os.Remove(f.Name())
require.NoError(t, err)
}()