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/framework.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

27 lines
515 B
Go

package framework
import (
"os"
"testing"
"github.com/kyverno/kyverno/test/e2e/framework/client"
"github.com/kyverno/kyverno/test/e2e/framework/step"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
)
func Setup(t *testing.T) {
gomega.RegisterTestingT(t)
if os.Getenv("E2E") == "" {
t.Skip("Skipping E2E Test")
}
}
func Run(t *testing.T, steps ...step.Step) {
ginkgo.By("Creating client ...")
client := client.New(t)
for _, step := range steps {
step(client)
}
ginkgo.By("Cleaning up ...")
}