Skip to content

Commit 2a07a04

Browse files
committed
fixup! add basic tests for error and success k8s diagnostics
1 parent ec91eef commit 2a07a04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/pkg/diagnostics/diagnostics_k8s_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"os"
1414
"path"
1515
"path/filepath"
16+
goruntime "runtime"
1617
"testing"
1718

1819
"github.com/stretchr/testify/assert"
@@ -984,7 +985,9 @@ func Test_collectK8sDiagnosticsWithClientAndToken(t *testing.T) {
984985
// We have the fake logs for the agent container
985986
assert.DirExists(t, filepath.Join(tempAssertDir, K8sSubdir, logsSubDir))
986987
assert.FileExists(t, filepath.Join(tempAssertDir, K8sSubdir, logsSubDir, fmt.Sprintf(CurrentLogFileFormat, "simplepod", "agent")))
987-
assert.DirExists(t, filepath.Join(tempAssertDir, cgroupSubDir))
988+
if goruntime.GOOS == "linux" {
989+
assert.DirExists(t, filepath.Join(tempAssertDir, cgroupSubDir))
990+
}
988991
},
989992
},
990993
}

0 commit comments

Comments
 (0)