1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-29 10:55:05 +00:00

Fix test command git issue (#3692)

Co-authored-by: shuting <shutting06@gmail.com>
This commit is contained in:
Vyankatesh Kudtarkar 2022-04-27 17:19:40 +05:30 committed by GitHub
parent 9d13e89697
commit d72ecd4853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)