fix staticcheck failures of test/e2e/manifest

This commit is contained in:
SataQiu 2019-12-13 14:03:44 +08:00
parent 7e01fe12bf
commit 95bf226533
2 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,6 @@ test/e2e/apps
test/e2e/autoscaling
test/e2e/instrumentation/logging/stackdriver
test/e2e/instrumentation/monitoring
test/e2e/manifest
test/images/agnhost/dns
test/images/agnhost/inclusterclient
test/images/agnhost/net/nat

View File

@ -166,6 +166,9 @@ func DaemonSetFromManifest(fileName, ns string) (*appsv1.DaemonSet, error) {
func RoleFromManifest(fileName, ns string) (*rbacv1.Role, error) {
var role rbacv1.Role
data, err := testfiles.Read(fileName)
if err != nil {
return nil, err
}
json, err := utilyaml.ToJSON(data)
if err != nil {