1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 18:06:55 +00:00
kyverno/test/e2e/framework/step/policy.go
Charles-Edouard Brétéché e1db7c9814
feat: add e2e framework and verify image new test (#4094)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-06-09 21:58:07 +08:00

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())
}
}