Plugins: Make file system path handling in tests OS agnostic (#79651)
* make path handling OS agnostic * PR feedback * fix input for test case
This commit is contained in:
@@ -147,7 +147,7 @@ func TestParsePluginTestdata(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
staticRootPath, err := filepath.Abs("../manager/testdata")
|
||||
staticRootPath, err := filepath.Abs(filepath.Join("..", "manager", "testdata"))
|
||||
require.NoError(t, err)
|
||||
dfs := os.DirFS(staticRootPath)
|
||||
ents, err := fs.ReadDir(dfs, ".")
|
||||
@@ -240,7 +240,7 @@ func TestParseTreeZips(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
staticRootPath, err := filepath.Abs("../storage/testdata")
|
||||
staticRootPath, err := filepath.Abs(filepath.Join("..", "storage", "testdata"))
|
||||
require.NoError(t, err)
|
||||
ents, err := os.ReadDir(staticRootPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user