Skip to content

Commit

Permalink
Fix permissions test for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hk21702 committed Jan 30, 2025
1 parent 7466d84 commit 41be65b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/insights/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package commands_test

import (
"os"
"runtime"
"testing"

"github.com/BurntSushi/toml"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 41be65b

Please sign in to comment.