mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Make paths and fingerprints platform-agnostic (#1622)
* test: windows * fix: make paths platform-agnostic this change also fixes, or skips, windows failures
This commit is contained in:
1 parent
818e32f7a4
commit
c2afd56bbe
13 files changed
+535
-91
No files matched your search
@@ -49,6 +49,7 @@ func TestWriteSarif(t *testing.T) {
|
||||
t.Run(test.cfgName, func(t *testing.T) {
|
||||
tmpfile, err := os.Create(filepath.Join(t.TempDir(), test.testReportName+".json"))
|
||||
require.NoError(t, err)
|
||||
defer tmpfile.Close()
|
||||
|
||||
reporter := SarifReporter{
|
||||
OrderedRules: []config.Rule{
|
||||
@@ -76,7 +77,10 @@ func TestWriteSarif(t *testing.T) {
|
||||
|
||||
want, err := os.ReadFile(test.expected)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, string(want), string(got))
|
||||
|
||||
wantStr := lineEndingReplacer.Replace(string(want))
|
||||
gotStr := lineEndingReplacer.Replace(string(got))
|
||||
assert.Equal(t, wantStr, gotStr)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user