Merge pull request #86991 from oomichi/skip

Move IsAppArmorSupported() from e2e framework
This commit is contained in:
Kubernetes Prow Robot 2020-01-08 23:45:44 -08:00 committed by GitHub
commit ef69bc910f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 24 deletions

View File

@ -166,7 +166,7 @@ func testPrivilegedPods(tester func(pod *v1.Pod)) {
tester(hostipc)
})
if framework.IsAppArmorSupported() {
if isAppArmorSupported() {
ginkgo.By("Running a custom AppArmor profile pod", func() {
aa := restrictedPod("apparmor")
// Every node is expected to have the docker-default profile.
@ -370,3 +370,8 @@ func restrictedPSP(name string) *policyv1beta1.PodSecurityPolicy {
func boolPtr(b bool) *bool {
return &b
}
// isAppArmorSupported checks whether the AppArmor is supported by the node OS distro.
func isAppArmorSupported() bool {
return framework.NodeOSDistroIs(framework.AppArmorDistros...)
}

View File

@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = [
"checks.go",
"cleanup.go",
"exec_util.go",
"expect.go",

View File

@ -1,22 +0,0 @@
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package framework
// IsAppArmorSupported checks whether the AppArmor is supported by the node OS distro.
func IsAppArmorSupported() bool {
return NodeOSDistroIs(AppArmorDistros...)
}