mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #86991 from oomichi/skip
Move IsAppArmorSupported() from e2e framework
This commit is contained in:
commit
ef69bc910f
@ -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...)
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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...)
|
||||
}
|
Loading…
Reference in New Issue
Block a user