mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 09:56:55 +00:00
17 lines
509 B
Go
17 lines
509 B
Go
package step
|
|
|
|
import (
|
|
"github.com/kyverno/kyverno/test/e2e/common"
|
|
"github.com/kyverno/kyverno/test/e2e/framework/client"
|
|
"github.com/kyverno/kyverno/test/e2e/framework/resource"
|
|
"github.com/onsi/ginkgo"
|
|
"github.com/onsi/gomega"
|
|
)
|
|
|
|
func CreateClusterPolicy(data []byte) Step {
|
|
return func(client client.Client) {
|
|
ginkgo.By("Creating cluster policy ...")
|
|
policy := client.CreateResource(resource.ClusterPolicy(data))
|
|
gomega.Expect(common.PolicyCreated(policy.GetName())).To(gomega.Succeed())
|
|
}
|
|
}
|