Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
added PL classification
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixking25 committed Jun 5, 2020
1 parent c0fc583 commit 8cac13d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 5 additions & 6 deletions benchmarks/e2e/tests/block_bind_mounts/block_bind_mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import (
"strings"

"github.com/onsi/ginkgo"
configutil "sigs.k8s.io/multi-tenancy/benchmarks/e2e/config"
"k8s.io/kubernetes/test/e2e/framework"
v1 "k8s.io/api/core/v1"
"k8s.io/kubernetes/test/e2e/framework"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
configutil "sigs.k8s.io/multi-tenancy/benchmarks/e2e/config"
)

const (
expectedVal = "Host path volumes are not allowed"
)

var _ = framework.KubeDescribe("Tenants should not be able to mount host volumes and folders", func() {
var _ = framework.KubeDescribe("[PL1] [PL2] [PL3] Tenants should not be able to mount host volumes and folders", func() {
var config *configutil.BenchmarkConfig
var tenantA configutil.TenantSpec
var user string
Expand All @@ -40,8 +40,8 @@ var _ = framework.KubeDescribe("Tenants should not be able to mount host volumes

ginkgo.It("Tenants should not be able to mount host volumes and folders", func() {
ginkgo.By(fmt.Sprintf("Tenant %s should not be able to mount host volumes and folders", user))
pod := e2epod.MakeSecPod(tenantA.Namespace, nil, InlineVolumeSources, false, "", false, false, nil, nil)

pod := e2epod.MakeSecPod(tenantA.Namespace, nil, InlineVolumeSources, false, "", false, false, nil, nil)

kclient := configutil.NewKubeClientWithKubeconfig(tenantA.Kubeconfig)
_, err = kclient.CoreV1().Pods(tenantA.Namespace).Create(pod)
Expand All @@ -51,4 +51,3 @@ var _ = framework.KubeDescribe("Tenants should not be able to mount host volumes
}
})
})

4 changes: 1 addition & 3 deletions benchmarks/e2e/tests/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

// test sources
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_add_capabilities"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_bind_mounts"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_cluster_resources"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_host_ipc"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_host_pid"
Expand All @@ -23,9 +24,6 @@ import (
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/configure_ns_quotas"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/create_network_policies"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/create_role_bindings"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_other_tenant_resources"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_host_ipc"
_ "sigs.k8s.io/multi-tenancy/benchmarks/e2e/tests/block_bind_mounts"
)

// RunE2ETests runs the multi-tenancy benchmark tests
Expand Down

0 comments on commit 8cac13d

Please sign in to comment.