Commit Graph

38 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
Patrick Ohly
d4729008ef e2e: simplify test cleanup
ginkgo.DeferCleanup has multiple advantages:
- The cleanup operation can get registered if and only if needed.
- No need to return a cleanup function that the caller must invoke.
- Automatically determines whether a context is needed, which will
  simplify the introduction of context parameters.
- Ginkgo's timeline shows when it executes the cleanup operation.
2022-12-13 08:09:01 +01: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
Edwin Xie
f167b9f4ab Fix e2e network dns_configmap test
Updates predicate to check for a length >=2 to avoid
the index out of bounds panic.

Signed-off-by: Edwin Xie <exie@vmware.com>
Co-authored-by: Tyler Schultz <tschultz@vmware.com>
2022-08-04 21:04:02 +00: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
wojtekt
749922fa46 Cleanup SIGDescribe in test/e2e/network 2021-02-27 20:29:27 +01:00
jay vyas
77b78a2c1f Remove federation tests entirely because they break clusters and aren't relevant anymore 2020-09-30 08:26:28 -04:00
Antonio Ojea
4bbf2c4a3e e2e dns test autodetect the IP family
instead of using tag to discriminate the e2e test, we can use
the e2e framework IPFamily method.
2020-07-22 12:23:21 +02:00
Sandeep Rajan
211448759c Fix failing DNS tests by removing deprecated upstream option 2020-07-13 12:53:19 -04:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Claudiu Belu
c57f20b712 tests: Replaces dnsutils image used with agnhost (part 4)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- dnsutils

dnsmasq is a Linux specific binary. In order for the tests to also
pass on Windows, CoreDNS should be used instead.
2020-02-26 21:51:23 -08: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
tanjunchen
586e1f2325 e2e/network/: Use e2eskipper package 2020-01-11 12:05:10 +08:00
Sandeep Rajan
95b0c3bde0 add ready plugin to dns tests 2019-09-03 10:34:27 -04:00
Claudiu Belu
8812720148 tests: Skips Windows-unrelated tests on Windows
Skips IPv6 tests on Windows.
Skips sysctl tests on Windows.
Skips network policy tests on Windows.
Skips RunAsUser / FSGroup / file permissions related tests, as those are
not supported on Windows.
Skips the test "should preserve source pod IP for traffic thru service cluster IP"
on Windows, as it creates a Pod with HostNetwork=true, which is unsupported.

What works and what doesn't work on Windows has been documented here:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md#windows--linux-considerations
2019-08-20 14:19:14 -07:00
draveness
c38ae01f8e feat: move service_util to separated package 2019-07-19 08:32:39 +08:00
Sandeep Rajan
9e683fab30 edit google dns hostname 2019-07-03 10:40:16 -04:00
Sandeep Rajan
bfb809f3c6 revert coredns to 1.3.1 2019-06-04 08:53:02 -04:00
Sandeep Rajan
08e3fb5588 Add ready plugin to dns tests 2019-05-24 11:08:58 -04:00
SataQiu
515f8342d3 fix golint failures of test/e2e/network 2019-05-11 22:29:40 +08:00
Kubernetes Prow Robot
888b81b638
Merge pull request #76238 from Dieken/30s-ttl-for-coredns
change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq
2019-04-23 06:20:09 -07:00
SataQiu
36bc97cbb8 fix some golint failures of e2e/network/[d-k]*.go 2019-04-08 18:27:08 +08:00
Yubao Liu
f7f51fab2a change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq 2019-04-07 20:41:25 +08:00
Sandeep Rajan
0172019d7d add health plugin in the DNS tests 2019-02-21 16:24:34 -05:00
Sandeep Rajan
4c8a65ac01 configure cluster domain via flags 2018-11-01 12:27:54 -04:00
Sandeep Rajan
9e8bd5ccca extend tests to support ipv6 functionality
ipv6 tests for configmap
2018-10-29 12:34:00 -04:00
Zihong Zheng
0cebf887e6 Disable DNS federation test 2018-09-18 10:23:03 -07:00
Sandeep Rajan
e2d435f213 add coredns configmap to federation test 2018-09-11 16:26:08 -04:00
hangaoshuai
dd2977f635 modify a duplicate e2e test of DNS configMap 2018-08-15 09:20:54 +08:00
Chris O'Haver
c66f932315 dns record scale test 2018-05-30 13:40:54 -04:00
Sandeep Rajan
d4ff4ca87f extend configmap tests to include CoreDNS 2018-05-22 17:10:41 -04:00
yankaiz
b32cc1be59 e2e test forwarding externalname dns lookup to upstream nameservers. 2018-04-19 16:53:41 -07:00
yankaiz
84a635e21a Fix failed e2e tests for dns configmap. 2018-04-12 15:00:14 -07:00
yankaiz
6a072b9085 Add e2e test for forwarding PTR records to upstream nameserver.
createDNSServerWithPtrRecord in dns_common.go is added to generate dns
server pod with PTR record.
2018-04-11 11:24:31 -07:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
xiangpengzhao
f2875794ec Add [sig-network] prefix to network e2e tests 2017-07-25 08:56:35 +08:00
Bowei Du
92a8c1fcb0 Moves networking e2e tests to test/e2e/network
This also adds sig-network-{approvers,reviewers} alias
2017-07-22 09:43:42 -07:00