Test pull requests using github actions

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-07-01 17:19:51 -04:00
parent 57d1eb6aa3
commit b392fed580
18 changed files with 214 additions and 56 deletions

View file

@ -178,6 +178,7 @@ var _ = framework.DescribeSetting("[Security] global-auth-url", func() {
err := f.DeleteDeployment(framework.HTTPBinService)
assert.Nil(ginkgo.GinkgoT(), err)
framework.Sleep()
f.HTTPTestClient().
GET(barPath).

View file

@ -40,7 +40,7 @@ const (
var _ = framework.IngressNginxDescribe("[Security] Pod Security Policies", func() {
f := framework.NewDefaultFramework("pod-security-policies")
ginkgo.BeforeEach(func() {
ginkgo.It("should be running with a Pod Security Policy", func() {
psp := createPodSecurityPolicy()
_, err := f.KubeClientSet.PolicyV1beta1().PodSecurityPolicies().Create(context.TODO(), psp, metav1.CreateOptions{})
if !k8sErrors.IsAlreadyExists(err) {
@ -73,10 +73,10 @@ var _ = framework.IngressNginxDescribe("[Security] Pod Security Policies", func(
})
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error updating ingress controller deployment flags")
f.NewEchoDeployment()
})
f.WaitForNginxListening(80)
f.NewEchoDeployment()
ginkgo.It("should be running with a Pod Security Policy", func() {
f.WaitForNginxConfiguration(
func(cfg string) bool {
return strings.Contains(cfg, "server_tokens on")
@ -125,5 +125,4 @@ func createPodSecurityPolicy() *policyv1beta1.PodSecurityPolicy {
},
},
}
}

View file

@ -96,6 +96,8 @@ var _ = framework.IngressNginxDescribe("[Security] Pod Security Policies with vo
})
assert.Nil(ginkgo.GinkgoT(), err, "updating ingress controller deployment")
f.WaitForNginxListening(80)
f.NewEchoDeployment()
f.WaitForNginxConfiguration(