From 41be65b66c7281855d66ddcdf74270923de2f24d Mon Sep 17 00:00:00 2001 From: kat <28567881+hk21702@users.noreply.github.com> Date: Thu, 30 Jan 2025 16:34:13 -0500 Subject: [PATCH] Fix permissions test for Windows --- cmd/insights/commands/commands_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/insights/commands/commands_test.go b/cmd/insights/commands/commands_test.go index 3f3dc02..4dec031 100644 --- a/cmd/insights/commands/commands_test.go +++ b/cmd/insights/commands/commands_test.go @@ -2,6 +2,7 @@ package commands_test import ( "os" + "runtime" "testing" "github.com/BurntSushi/toml" @@ -52,7 +53,7 @@ func TestConsent(t *testing.T) { "Bad Command": {args: []string{"consent", "-unknown"}, wantUsageErr: true, wantErr: true}, "Bad State": {args: []string{"consent", "-c=bad"}, wantUsageErr: true, wantErr: true}, - "Set Dir No Perms": {args: []string{"consent", "-c=true"}, consentFiles: map[string]bool{"consent.toml": false, "abc-consent.toml": false}, dirNoPerms: true, wantGetDirErr: true, wantErr: true}, + "Set Dir No Perms": {args: []string{"consent", "-c=true"}, consentFiles: map[string]bool{"consent.toml": false, "abc-consent.toml": false}, dirNoPerms: true, wantGetDirErr: runtime.GOOS != "windows", wantErr: runtime.GOOS != "windows"}, } for name, tc := range tests {