mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
Move Test files to tesdata directory
This commit is contained in:
BIN
core/.DS_Store
vendored
Normal file
BIN
core/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
core/pkg/.DS_Store
vendored
Normal file
BIN
core/pkg/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
core/pkg/fixhandler/.DS_Store
vendored
Normal file
BIN
core/pkg/fixhandler/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -28,9 +28,9 @@ func NewFixHandlerMock() (*FixHandler, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func fixCommandPath() string {
|
||||
o, _ := os.Getwd()
|
||||
return filepath.Join(filepath.Dir(o), "..", "..", "examples", "fix-command")
|
||||
func getTestdataPath() string {
|
||||
currentDir, _ := os.Getwd()
|
||||
return filepath.Join(currentDir, "testdata")
|
||||
}
|
||||
|
||||
func testDirectoryApplyFixHelper(t *testing.T, yamlExpressions *[][]string, directoryPath string) {
|
||||
@@ -98,7 +98,7 @@ func testDirectoryApplyFixHelper(t *testing.T, yamlExpressions *[][]string, dire
|
||||
}
|
||||
|
||||
func testDirectoryApplyFix(t *testing.T, directory string) {
|
||||
directoryPath := filepath.Join(fixCommandPath(), directory)
|
||||
directoryPath := filepath.Join(getTestdataPath(), directory)
|
||||
var yamlExpressions [][]string
|
||||
|
||||
switch directory {
|
||||
|
||||
BIN
core/pkg/fixhandler/testdata/.DS_Store
vendored
Normal file
BIN
core/pkg/fixhandler/testdata/.DS_Store
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user