Fix test command git issue
@@ -6,6 +6,7 @@ import (
"io/ioutil"
"net/url"
"os"
+ "path"
"path/filepath"
"regexp"
"sort"
@@ -398,7 +399,7 @@ func testCommandExecute(dirPath []string, fileName string, gitBranch string, tes
continue
}
- if file.Name() == fileName {
+ if path.Base(file.Name()) == fileName {
testYamlCount++
policyresoucePath := strings.Trim(yamlFilePath, fileName)
bytes, err := ioutil.ReadAll(file)
