Commit Graph

34 Commits

Author SHA1 Message Date
Patrick Ohly
4d63e7d4d6 e2e: remove unused label filter from WaitForPodsRunningReady
None of the users of the functions passed anything other than nil or an empty
map and the implementation ignore the parameter - it seems like a candidate for
simplification.
2023-02-06 15:39:12 +01:00
Antonio Ojea
7f5ae1c0c1
Revert "e2e: wait for pods with gomega" 2023-02-06 12:08:22 +01:00
Patrick Ohly
3ebab68c8a e2e: remove unused label filter from WaitForPodsRunningReady
None of the users of the functions passed anything other than nil or an empty
map and the implementation ignore the parameter - it seems like a candidate for
simplification.
2023-01-31 07:52:26 +01:00
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
0d73c0d0e5 e2e: fix linter errors
Adding "ctx" as parameter in the previous commit led to some linter errors
about code that overwrites "ctx" without using it.

This gets fixed by replacing context.Background or context.TODO in those code
lines with the new ctx parameter.

Two context.WithCancel calls can get removed completely because the context
automatically gets cancelled by Ginkgo when the test returns.
2022-12-10 20:35:46 +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
Patrick Ohly
5614a9d064 e2e framework: eliminate interim sub packages
The "todo" packages were necessary while moving code around to avoid hitting
cyclic dependencies. Now that any sub package can depend on the framework, they
are no longer needed and the code can be moved into the normal sub packages.
2022-10-06 08:16:47 +02:00
Patrick Ohly
a46fea53e6 e2e framework: move pod exec and create into sub package 2022-10-06 08:16:47 +02:00
Patrick Ohly
2c8ef492ae e2e framework: move kubectl and pod helper code 2022-10-06 08:16:47 +02:00
Kubernetes Prow Robot
9dc13f4f57
Merge pull request #111011 from ii/promote-patch-pod-status-test
Promote patchCoreV1NamespacedPodStatus test - +1 endpoint
2022-07-08 09:07:52 -07: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
Stephen Heywood
c288ebe53c Promote PodStatus e2e test to Conformance 2022-07-08 11:51:58 +12:00
Stephen Heywood
bc22560bb4 Create e2e test for PodStatus endpoint
e2e test validates the following endpoint
- patchCoreV1NamespacedPodStatus
2022-06-28 09:14:11 +12:00
Kubernetes Prow Robot
60481c944e
Merge pull request #109946 from tallclair/ps-e2e
Restricted Pod E2E tests
2022-05-25 14:45:22 -07:00
Kubernetes Prow Robot
b0991517e5
Merge pull request #110127 from jwtty/boolcheck
test/e2e/common/node: enhance assertions
2022-05-25 13:35:23 -07:00
Tim Allclair
702ab97722 Run common pod E2Es as restricted 2022-05-24 16:10:16 -07:00
Lukasz Szaszkiewicz
4a7845b485 users of watchtools.NewIndexerInformerWatcher should wait for the informer to sync
previously users of this method were relying on the fact that a call to LIST was made.
Instead, users should use the dedicated `HasSynced` method.
2022-05-24 13:05:40 +02:00
Wantong Jiang
93692ef57d enhance assertions in test/e2e/common/node 2022-05-23 00:39:09 +00:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Jordan Liggitt
f9db31dbcc Improve debug output in pod conformance test failures 2022-03-26 13:00:31 -04:00
Masaki Kimura
41570eb02d e2e: deflake "should run through the lifecycle of Pods and PodStatus" 2022-03-23 17:47:15 +00:00
David Porter
7ac2896a14 test: increase timeout in pod collection deletion
Increase the current timeout of 1 minute for waiting for all pods to be
deleted to avoid flakiness. To avoiding hardcoding a timeout, use the
built in framework's `PodDelete` timeout which defaults to 5 minutes.

While we are in here, also change `framework.PodStartTimeout` to use
`f.Timeouts.PodStart` since `framework.PodStartTimeouts` are marked as
deprecated.

Signed-off-by: David Porter <david@porter.me>
2022-03-18 13:40:29 -07:00
Claudiu Belu
720ffb826a tests: Updates the should delete a collection of pods test
We should wait for all 3 pods after we've spawned them, instead of
spawning and waiting for them sequentially.
2022-03-10 08:32:50 -08:00
Sergey Kanzhelev
fc42da8eb8 PodReadinessGate is stable feature and test runs all green 2021-11-10 07:34:14 +00:00
Claudiu Belu
f7cf747e48 tests: Wait for pod collection to enter a Running state
While running tests in parallel, especially those with higher loads
than others, it might take some time for Pods to be Running, even more
so if the image has to be pulled as well.

The test [sig-node] Pods should delete a collection of pods [Conformance]
only waits for the for the pods to be scheduled before deleting them, and
expects them to be gone in 1 minute, which can flake because of the above
reasons. Note that the operations are in order, and kubelet runs them in
order, which means that the pod first has to enter the Running state
before attempting to delete it.

This commit waits for the Pods to enter the Running state first before
deleting the entire collection.

Co-Authored-By: Antonio Ojea <aojea@redhat.com>
2021-10-04 20:42:16 -07:00
Kubernetes Prow Robot
02355e22b3
Merge pull request #103650 from dims/get-golangci-lint-back-on-its-feet
Get golangci lint back on its feet
2021-07-15 02:06:48 -07:00
Kubernetes Prow Robot
f6c2068623
Merge pull request #102921 from fromanirh/pod-readiness-gate-timeout
e2e: increase readiness gate timeout
2021-07-14 23:34:48 -07: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
07332ad398
fix ineffassign and varcheck
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:41:22 -04:00
Matthias Bertschy
b1f34ea205 add RetryOnConflict to pod status updates 2021-07-02 12:38:53 +02:00
Francesco Romani
c69ad8c57a e2e: increase readiness gate timeout
We're trying to fix https://github.com/kubernetes/kubernetes/issues/75355
sicne long time, and we believe the current timeout could
actually be too low (despite being "forever", which is 30s).

To validate this theory, we set the timeout to one full minute.

Also, make the logging more verbose to make the troubleshooting easier.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-06-29 09:01:31 +02:00
Stephen Heywood
4e3d006001 Increase TerminationGracePeriodSeconds to 1 2021-05-12 11:09:34 +12:00
James Sturtevant
d0683b8ce2 align some of the pod start up times 2021-04-02 11:29:38 -07:00
wojtekt
3b438eb4e5 Cleanup test/e2e/common directory - part2 2021-03-03 10:27:35 +01:00