Skip to content

Commit ad7adaa

Browse files
committed
Update managedidentity_test.go
Updated the tests to remove platform dependecy
1 parent 6cc8dcf commit ad7adaa

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

apps/managedidentity/managedidentity_test.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,8 @@ func TestGetSource(t *testing.T) {
183183
}
184184

185185
func TestAzureArcReturnsWhenHimdsFound(t *testing.T) {
186-
if runtime.GOOS == "darwin" {
187-
t.Skip("Skipping test on macOS as HIMDS is not supported")
188-
}
189-
190186
unsetEnvVars(t)
191-
// Get system dependent mock file path
192-
var mockFilePath string
193-
if runtime.GOOS == "windows" {
194-
mockFilePath = filepath.Join(os.TempDir(), "himds.exe")
195-
} else {
196-
mockFilePath = filepath.Join("/tmp", "himds")
197-
}
187+
mockFilePath := filepath.Join(t.TempDir(), "himds")
198188
setCustomAzureArcFilePath(t, mockFilePath)
199189

200190
// Create the mock himds file

0 commit comments

Comments
 (0)