Commit Graph

133 Commits

Author SHA1 Message Date
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Kubernetes Prow Robot
60274a1a0a
Merge pull request #114131 from aojea/noflaky_lb
remove flaky tag for GCE NEG tests
2022-12-12 11:43:33 -08:00
Kubernetes Prow Robot
23c65ec590
Merge pull request #114411 from aojea/e2e_panic
don't assert error inside goroutines
2022-12-11 10:13:32 -08:00
Antonio Ojea
2956bb39a1 don't assert error inside goroutines
Change-Id: Ifed741d1973e96063378620daf7b8b22647bc2fb
2022-12-11 15:34:17 +00:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Antonio Ojea
b89f42be26 remove flaky tag for GCE NEG tests
Fixed by

https://github.com/kubernetes/kubernetes/pull/113858
https://github.com/kubernetes/kubernetes/pull/113562
2022-11-25 08:52:35 +00:00
Tim Hockin
0153bfad16
Copy LoadBalancerStatus from core to networking
This type should never have been shared between Service and Ingress.
The `ports` field is unfortunate, but it is needed to stay compatible.
2022-11-02 16:13:31 -07:00
Dave Chen
fd4b5b629b Stop using the deprecated method CurrentGinkgoTestDescription
Besides, the using of method might lead to a `concurrent map writes`
issue per the discussion here: https://github.com/onsi/ginkgo/issues/970

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:46:11 +08:00
Dave Chen
857458cfa5 update ginkgo from v1 to v2 and gomega to 1.19.0
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:44:46 +08:00
Sergiusz Urbaniak
1495c9f2cd
test/e2e/*: default existing tests to privileged pod security policy
This is to ensure that all existing tests don't break when defaulting
the pod security policy to restricted in the e2e test framework.
2022-04-05 08:41:12 +02:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Dave Chen
85dfca3e16 Remove the legacy Nginx testcases
Those testcases does't work anymore after nginx-ingress controller
has been upgraded to v1.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-03-09 10:38:07 +08:00
srikiz
b4dd9cb388 incorporate review comments 2022-01-25 20:11:12 +05:30
srikiz
430b8e6981 fix ingress path when validating webhook for ingress is in place while tests are running 2022-01-25 18:56:47 +05:30
Ahmed Aghadi
93d858c46e
Improve checks for test/e2e/network and test/e2e/network/netpol (#106655) 2021-12-07 22:07:56 -08:00
Davanum Srinivas
75748c185e
enable verify-golangci-lint.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:53:33 -04:00
Davanum Srinivas
26cc8e40a8
fix deadcode issues
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:41:21 -04:00
Antonio Ojea
da9ec0d4c7 remove ingress kubemci tests from e2e 2021-05-20 10:18:43 +02:00
Antonio Ojea
5ffed5133d tag ingress multicluster test and adapt to v1 2021-05-19 13:28:22 +02:00
Antonio Ojea
c822a1f2c6 gcp ingress only supports ImplementationSpecific path type 2021-05-19 11:48:01 +02:00
Antonio Ojea
8f5020a3aa skip nginx controller e2e tests 2021-05-18 22:49:07 +02:00
Antonio Ojea
7d7179ebfd bump e2e test to ingress v1 2021-05-18 21:42:48 +02:00
Minhan Xia
e9ef140c3c mark ingress neg test flaky 2021-03-04 10:17:21 -08:00
wojtekt
749922fa46 Cleanup SIGDescribe in test/e2e/network 2021-02-27 20:29:27 +01:00
Jordan Liggitt
9a61b305d2 Deflake ingress updates 2021-01-26 10:54:17 -05:00
Spencer Hance
47ea73bfb9 Update ingress conformance test for finalizers 2020-11-25 11:24:21 -08:00
Aaron Crickenberger
deffddbfb5 Remove tests related to HTTPS support for ingress-gce 2020-09-11 13:32:27 -07:00
Spencer Hance
7c0169d976 Reserve Static IP in Ingress test 2020-08-21 10:54:10 -07:00
Kubernetes Prow Robot
a789d56b65
Merge pull request #93119 from dcbw/e2e-ingress-misisng-return
test/e2e/ingress: add missing return to fix panics on !GCE
2020-07-18 13:58:49 -07:00
Dan Williams
e24f9ed1cd test/e2e/ingress: add missing return to fix panics on !GCE
A missing 'return' causes the AfterEach() to try to clean up
GCE ingress objects when they haven't been created, because
the test was skipped in BeforeEach().

2020-07-15T17:21:10.3690332Z [BeforeEach] GCE [Slow] [Feature:kubemci]
2020-07-15T17:21:10.3690715Z   /home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:592
2020-07-15T17:21:10.3690970Z Jul 15 17:21:10.368: INFO: Only supported for providers [gce gke] (not )
2020-07-15T17:21:10.3694003Z [AfterEach] GCE [Slow] [Feature:kubemci]
2020-07-15T17:21:10.3696927Z   /home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:614
2020-07-15T17:21:10.3697845Z [1mSTEP[0m: No ingress created, no cleanup necessary
2020-07-15T17:21:10.3698213Z [1mSTEP[0m: Cleaning up cloud resources
2020-07-15T17:21:15.3709789Z E0715 17:21:15.370134   78875 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
2020-07-15T17:21:15.3710883Z goroutine 63 [running]:
2020-07-15T17:21:15.3711892Z [AfterEach] [sig-network] Loadbalancing: L7
2020-07-15T17:21:15.3712802Z k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime.logPanic(0x40215e0, 0x7b71700)
2020-07-15T17:21:15.3713654Z   /home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:179
2020-07-15T17:21:15.3714871Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0xa3
2020-07-15T17:21:15.3715130Z Jul 15 17:21:15.370: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready
2020-07-15T17:21:15.3715703Z k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
2020-07-15T17:21:15.3716215Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x82
2020-07-15T17:21:15.3716610Z panic(0x40215e0, 0x7b71700)
2020-07-15T17:21:15.3717184Z 	/opt/hostedtoolcache/go/1.13.4/x64/src/runtime/panic.go:679 +0x1b2
2020-07-15T17:21:15.3717803Z k8s.io/kubernetes/test/e2e/framework/providers/gce.(*IngressController).deleteForwardingRule(0x0, 0x0, 0xc0034cce04, 0x2)
2020-07-15T17:21:15.3718372Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/providers/gce/ingress.go:158 +0x20b
2020-07-15T17:21:15.3718859Z k8s.io/kubernetes/test/e2e/framework/providers/gce.(*IngressController).Cleanup(0x0, 0x0, 0x1, 0xc0034ccd68)
2020-07-15T17:21:15.3719369Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/providers/gce/ingress.go:724 +0x38
2020-07-15T17:21:15.3719947Z k8s.io/kubernetes/test/e2e/framework/providers/gce.(*IngressController).CleanupIngressControllerWithTimeout.func1(0xc0034ccd78, 0xc00315e8a0, 0xc0002acf88)
2020-07-15T17:21:15.3720474Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/providers/gce/ingress.go:88 +0x33
2020-07-15T17:21:15.3720968Z k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection(0xc0034ccfa0, 0xc0034cce00, 0x0, 0x0)
2020-07-15T17:21:15.3721508Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:211 +0x6f
2020-07-15T17:21:15.3722020Z k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.WaitFor(0xc003393120, 0xc0034ccfa0, 0xc00341ae40, 0x0, 0x0)
2020-07-15T17:21:15.3722542Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:528 +0x159
2020-07-15T17:21:15.3723233Z k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.pollInternal(0xc003393120, 0xc0034ccfa0, 0x0, 0x0)
2020-07-15T17:21:15.3723771Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:414 +0x9f
2020-07-15T17:21:15.3724305Z k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait.Poll(0x12a05f200, 0xd18c2e2800, 0xc0034ccfa0, 0xc0000a4940, 0xc0034ccfb0)
2020-07-15T17:21:15.3724872Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:408 +0x4d
2020-07-15T17:21:15.3725377Z k8s.io/kubernetes/test/e2e/framework/providers/gce.(*IngressController).CleanupIngressControllerWithTimeout(0x0, 0xd18c2e2800, 0x0, 0x0)
2020-07-15T17:21:15.3726709Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/providers/gce/ingress.go:87 +0x69
2020-07-15T17:21:15.3743725Z k8s.io/kubernetes/test/e2e/framework/providers/gce.(*IngressController).CleanupIngressController(...)
2020-07-15T17:21:15.3744385Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/providers/gce/ingress.go:81
2020-07-15T17:21:15.3744822Z k8s.io/kubernetes/test/e2e/network.glob..func10.4.2()
2020-07-15T17:21:15.3745340Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:626 +0x12a
2020-07-15T17:21:15.3745868Z k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0xc000e17740, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
2020-07-15T17:21:15.3746756Z 	/home/runner/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go:113 +0xb8

Fixes: 0f81362fa0
2020-07-16 14:56:08 -05:00
Stephen Heywood
d055eb5f61 Ingress: Add test for API get /status 2020-07-13 10:33:00 +00:00
Christopher M. Luciano
ca2b5b7605
ingress: promote CRUD API tests for v1 to conformance
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-06-17 13:01:16 -04:00
Christopher M. Luciano
7351330255
ingress: Add CRUD tests for Ingress API verbs
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-06-10 15:20:36 -04:00
Kenichi Omichi
2f5f16004d Move DescribeIng() into e2eingress
The function is only for e2e ingress test, it is not necessary to
keep the function in e2e test core framework.
2020-04-06 20:01:55 +00:00
wojtekt
268b51d023 Cleanup and fix networking test timeouts for large clusters 2020-04-02 17:19:41 +02:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Kenichi Omichi
75ca65806d Replace ExpectNoError(fmt.Errorf(..)) with funcs
There were framework.ExpectNoError(fmt.Errorf(..)) calls which just
raise an exception without actual value checks, they just raised the
specified error messages. These usages of framework.ExpectNoError()
seemed a little tricky, so this replaces them with corresponding check
functions for the readability.
2020-03-06 22:00:10 +00:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Kubernetes Prow Robot
2da2c3b01b
Merge pull request #87132 from yuxiaobo96/k8s-removeTODO
remove TODO in test/e2e/framework/providers/gce/ingress.go
2020-01-15 11:56:37 -08:00
yuxiaobo
cb07680ee9 remove TODO in test/e2e/framework/providers/gce/ingress.go
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-14 10:43:03 +08:00
tanjunchen
586e1f2325 e2e/network/: Use e2eskipper package 2020-01-11 12:05:10 +08:00
danielqsj
6596a14d39 add missing alias of api errors under test 2019-12-26 17:29:38 +08:00
Jordan Liggitt
2164157113 Make e2e scale updates unconditional 2019-12-16 15:46:35 -05:00
tanjunchen
d51b72d9e9 fix staticcheck in test/e2e/network/ 2019-12-05 13:58:28 +08:00
Kenichi Omichi
ca4c349096 Move functions from e2e/framework/util.go
- SimpleGET: Moved to ingress sub package of e2e framework
- PollURL: Moved to ingress sub package of e2e framework
- ProxyMode: Moved to service e2e test package
- ListNamespaceEvents: Moved to e2e_node test package
- NewE2ETestNodePreparer: Removed since 59533f0cd1
2019-11-01 17:39:29 +00:00
Kubernetes Prow Robot
1d724554f0
Merge pull request #82696 from mm4tt/nginx_custom_lb_timeout
Adjust nginx lb timeout depending on the cluster size in tests
2019-09-16 20:28:23 -07:00
Matt Matejczyk
532298c399 Adjust nginx lb timeout in tests
In addition delete the service & lb before ending to test to avoid the case
when deleting the namespace times out due to long LB deletion.

Ref.  https://github.com/kubernetes/kubernetes/issues/82695
2019-09-16 13:07:47 +02:00
hwdef
af16366001 use log func in test/e2e/network 2019-09-13 17:54:51 +08:00
Kenichi Omichi
7ca57877b0 Fix error message of ListTargetHTTPSProxies
The error message of ListTargetHTTPSProxies operation contained
ListTargetHTTPProxies(HTTP instead of HTTPS) wrongly.
This fixes it.
2019-07-26 20:25:11 +00:00