Skip to content

Commit

Permalink
Merge pull request #2383 from aledbf/improve-e2e-speed
Browse files Browse the repository at this point in the history
Improve speed of e2e tests
  • Loading branch information
k8s-ci-robot authored Apr 20, 2018
2 parents 10fc254 + 42e0c0a commit 13aa49c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ Session.vim

e2e-tests

coverage.txt
coverage.txt
test/e2e/e2e\.test
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ jobs:
# start minikube
- test/e2e/up.sh
script:
- if ! go get github.com/jteeuwen/go-bindata/...; then github.com/jteeuwen/go-bindata/...;fi
- go get github.com/jteeuwen/go-bindata/...
- make cover
- stage: e2e
before_script:
- if ! go get github.com/jteeuwen/go-bindata/...; then github.com/jteeuwen/go-bindata/...;fi
- go get github.com/jteeuwen/go-bindata/...
- go get github.com/onsi/ginkgo/ginkgo
- make e2e-image
- test/e2e/up.sh
script:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ e2e-image: sub-container-amd64

.PHONY: e2e-test
e2e-test:
@go test -o e2e-tests -c ./test/e2e
@KUBECONFIG=${HOME}/.kube/config ./e2e-tests -alsologtostderr -test.v -logtostderr -ginkgo.trace
@ginkgo build ./test/e2e
@KUBECONFIG=${HOME}/.kube/config ginkgo -randomizeSuites -randomizeAllSpecs -flakeAttempts=2 -p -trace -nodes=2 ./test/e2e/e2e.test

.PHONY: cover
cover:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (f *Framework) NewIngressController(namespace string) error {
execErr bytes.Buffer
)

cmd := exec.Command("test/e2e/wait-for-nginx.sh", namespace)
cmd := exec.Command("./wait-for-nginx.sh", namespace)
cmd.Stdout = &execOut
cmd.Stderr = &execErr

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) b
}

var pod *v1.Pod
Loop:

for _, p := range l.Items {
if strings.HasPrefix(p.GetName(), "nginx-ingress-controller") {
if isRunning, err := podRunningReady(&p); err == nil && isRunning {
pod = &p
break Loop
break
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/lua/dynamic_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
Expect(err).NotTo(HaveOccurred())
Expect(ing).NotTo(BeNil())

time.Sleep(5 * time.Second)
time.Sleep(10 * time.Second)

err = f.WaitForNginxServer(host,
func(server string) bool {
Expand Down
1 change: 1 addition & 0 deletions test/manifests/ingress-controller/with-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
- --annotations-prefix=nginx.ingress.kubernetes.io
- --watch-namespace=$(POD_NAMESPACE)
env:
- name: POD_NAME
valueFrom:
Expand Down

0 comments on commit 13aa49c

Please sign in to comment.