diff --git a/app/secrets/plugins/wincred/load_other_test.go b/app/secrets/plugins/wincred/load_other_test.go new file mode 100644 index 0000000..ddaa6f9 --- /dev/null +++ b/app/secrets/plugins/wincred/load_other_test.go @@ -0,0 +1,11 @@ +//go:build !windows + +package plugins + +import "testing" + +func TestLoadWindowsCredentialUnsupported(t *testing.T) { + if _, err := loadWindowsCredential("target", "raw"); err == nil { + t.Fatal("expected unsupported-platform error") + } +} diff --git a/app/secrets/plugins/wincred/plugin_test.go b/app/secrets/plugins/wincred/plugin_test.go index fa6d80b..b6f0d6c 100644 --- a/app/secrets/plugins/wincred/plugin_test.go +++ b/app/secrets/plugins/wincred/plugin_test.go @@ -3,7 +3,6 @@ package plugins import ( "context" "encoding/binary" - "runtime" "testing" "unicode/utf16" ) @@ -29,15 +28,6 @@ func TestWinCredPluginLoad(t *testing.T) { } } -func TestLoadWindowsCredentialUnsupported(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("non-windows unsupported-path test") - } - if _, err := loadWindowsCredential("target", "raw"); err == nil { - t.Fatal("expected unsupported-platform error") - } -} - func TestWinCredPluginLoadInvalidID(t *testing.T) { p := winCredPlugin{} if _, err := p.Load(context.Background(), "#utf8"); err == nil {