From 6fe2b0ce38af450fdf5e6c0b03b7045c8e6da916 Mon Sep 17 00:00:00 2001 From: abhinavDhulipala <46908860+abhinavDhulipala@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:04:47 -0700 Subject: [PATCH] don't clear env on test suite (#100) --- exporter/trace_test.go | 2 -- exporter/utils_test.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/exporter/trace_test.go b/exporter/trace_test.go index d018e61..8c4ef1d 100644 --- a/exporter/trace_test.go +++ b/exporter/trace_test.go @@ -207,7 +207,6 @@ func TestPython3Wrapper(t *testing.T) { } func TestDetectTraceRootPath_Env(t *testing.T) { - os.Clearenv() testDir := t.TempDir() t.Setenv("TRACE_ROOT_PATH", testDir) // Ensure that the function panics if given a TRACE_ROOT_PATh with no 'templates' subdirectory @@ -219,7 +218,6 @@ func TestDetectTraceRootPath_Env(t *testing.T) { } func TestDetectTraceRootPath_Default(t *testing.T) { - os.Clearenv() testDir := t.TempDir() os.Chdir(testDir) diff --git a/exporter/utils_test.go b/exporter/utils_test.go index 012c56e..4a675b2 100644 --- a/exporter/utils_test.go +++ b/exporter/utils_test.go @@ -37,7 +37,7 @@ func TestCliFetcher(t *testing.T) { assert := assert.New(t) cliFetcher := NewCliScraper("ls") data, err := cliFetcher.FetchRawBytes() - assert.Nil(err) + assert.NoError(err) assert.NotNil(data) }