Commit Graph

1810 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
20e8b20b75
Merge pull request #116569 from tukwila/validate_testVols
check if test volumes created
2023-03-15 12:20:31 -07:00
Kubernetes Prow Robot
f7bcff44cd
Merge pull request #116425 from jsafrane/flip-selinux
Flip SELinuxMountReadWriteOncePod to Beta
2023-03-14 16:34:41 -07:00
Jan Safranek
a84dc2d5c5 Flip SELinuxMountReadWriteOncePod to Beta
And enable all e2e tests by default. They're still behind
`[Feature:SELinux]` tag to ensure the underlying OS supports SELinux.
2023-03-14 14:32:38 +01:00
zhucan
80ff4b90a5 e2e: test for node expand volume with secrets failed
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2023-03-14 21:12:31 +08:00
Paco Xu
a5587de2e4 print all calls when compare CSI call failed 2023-03-14 18:03:08 +08:00
Paco Xu
40d543a59d check node expand secret ref and fix CSI calls compare failure
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-14 16:51:46 +08:00
Paco Xu
2f71a635af get pvc again to get the pv name that bound to the PVC
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-14 16:51:46 +08:00
guangli.bao
e0e835c63c check if test volumes created 2023-03-14 14:09:54 +08:00
Kubernetes Prow Robot
6612af0af0
Merge pull request #110304 from RomanBednar/resize-e2e
add e2e test for correct resizing of a snaphot restore
2023-03-13 22:27:08 -07:00
Kubernetes Prow Robot
1f2d49972c
Merge pull request #116424 from jsafrane/add-selinux-metric-test
Add e2e tests for SELinux metrics
2023-03-10 12:41:06 -08:00
Jan Safranek
771c9be291 Add e2e test for SELinux metrics
This is the commit message for patch #2 (refresh-temp):
2023-03-10 15:03:56 +01:00
Kubernetes Prow Robot
499a03d88b
Merge pull request #115451 from zhucan/nodeexpandvolume-secret-e2e
e2e: add e2e test to node expand volume with secret
2023-03-08 07:53:12 -08:00
zhucan
7a87b4363b e2e: add e2e test to node expand volume with secret
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2023-03-08 10:27:50 +08:00
Davanum Srinivas
b50d9d1e28
Cleanup vendor/
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-07 10:27:15 -05:00
Davanum Srinivas
90d185b7e1
Drop AWS kubelet credential provider and cleanup AWS storage e2e tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-07 09:00:12 -05:00
torredil
6aebda9b1e Remove AWS legacy cloud provider + EBS in-tree storage plugin
Signed-off-by: torredil <torredil@amazon.com>
2023-03-06 14:01:15 +00:00
Kubernetes Prow Robot
37d8b5a2b8
Merge pull request #116227 from gnufied/wait-for-pod-startup-before-resize
Wait for pod to be running before expanding
2023-03-03 09:18:59 -08:00
Hemant Kumar
53585ec009 Bump the timeout for volume expansion 2023-03-02 22:36:24 -05:00
Hemant Kumar
99fe00797d Wait for pod to be running before expanding 2023-03-02 12:57:17 -05:00
torredil
42909af615
Add windows nodeSelector to provisioning functions
Signed-off-by: torredil <torredil@amazon.com>
2023-02-28 21:21:29 +00:00
Roman Bednar
fbe39a8e96 skip e2e test for checking filesystem resizing on Windows
Test is currently using `stat` Linux command which won't work on Windows.
2023-02-27 10:47:02 +01:00
Roman Bednar
7484c69a16 add e2e test for snapshot restore resizing 2023-02-27 10:47:02 +01:00
Roman Bednar
8567eafa02 add anti-capability to allow resize test skipping 2023-02-27 10:47:02 +01:00
Roman Bednar
b62794c52e fix a typo 2023-02-27 10:47:02 +01:00
Patrick Ohly
41f23f52d0 test: fix ginkgolinter issues
All of these issues were reported by https://github.com/nunnatsa/ginkgolinter.
Fixing these issues is useful (several expressions get simpler, using
framework.ExpectNoError is better because it has additional support for
failures) and a necessary step for enabling that linter in our golangci-lint
invocation.
2023-02-22 19:36:05 +01:00
Jan Safranek
ba099644b2 Remove global framework variable
`f framework.Framework` does not need to be global, it's used only on a few
places.

This fixes vSphereDriver.PrepareTest() in in_tree.go that schedules
ginkgo.DeferCleanup() that uses the global `f` variable, but its value is not
valid at the time of ginkgo cleanup.
2023-02-20 11:00:12 +01:00
Chris Henzie
0e47d90dd1 test: e2e test for ReadWriteOncePod preemption 2023-02-14 10:09:57 -08:00
Matthew Cary
69808b74ec Remove obsolete GKE local SSD test
Change-Id: I156bd03ac740c2ebe394081d3106851f7182269f
2023-02-07 17:33:32 -08:00
Kubernetes Prow Robot
090025f5e6
Merge pull request #115548 from pohly/e2e-wait-for-pods-with-gomega
e2e: wait for pods with gomega, II
2023-02-07 07:01:21 -08:00
Kubernetes Prow Robot
4f321041bd
Merge pull request #115537 from MadhavJivrajani/bump-tools-deps-go120
*: Bump golangci-lint version and adapt to new linters
2023-02-07 05:53:12 -08:00
Madhav Jivrajani
5e1f440d0a *: Fix linter warnings
Adapt to newly improved linters in golangci-lint v1.51.1

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-02-07 13:01:41 +05:30
torredil
25389ee0ee
Add nodeSelector to e2e storage testing pods
Signed-off-by: torredil <torredil@amazon.com>
2023-02-06 16:00:51 +00:00
Patrick Ohly
136f89dfc5 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-02-06 15:39:13 +01:00
Patrick Ohly
9df3e2a47a e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace
WaitForPodToDisappear was always called such that it listed all pods, which
made it less efficient than trying to get just the one pod it was checking for.

Being able to customize the poll interval in practice wasn't useful, therefore
it can be replaced with WaitForPodNotFoundInNamespace.
2023-02-06 15:39:12 +01:00
Patrick Ohly
45d4631069 e2e: consolidate checking a pod list
WaitForPods is now a generic function which lists pods and then checks the pods
that it found against some provided condition. A parameter determines how many
pods must be found resp. match the condition for the check to succeed.
2023-02-06 15:39:12 +01:00
Patrick Ohly
d17ce64ac5 e2e storage: remove WaitForPodTerminatedInNamespace
Calling WaitForPodTerminatedInNamespace after testFlexVolume is useless because
the client pod that it waits for always gets deleted by testVolumeClient:

0fcc3dbd55/test/e2e/framework/volume/fixtures.go (L541-L546)

Worse, because WaitForPodTerminatedInNamespace treats "not found" as "must keep
polling", these two tests always kept waiting for 5 minutes:

    Kubernetes e2e suite: [It] [sig-storage] Flexvolumes should be mountable
    when non-attachable 	6m4s

The only reason why these tests passed is that WaitForPodTerminatedInNamespace
used to return the "not found" API error. That is not guaranteed and about to
change.
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
222f655062 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-01-31 13:01:39 +01:00
Patrick Ohly
6eea1b2efa e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace
WaitForPodToDisappear was always called such that it listed all pods, which
made it less efficient than trying to get just the one pod it was checking for.

Being able to customize the poll interval in practice wasn't useful, therefore
it can be replaced with WaitForPodNotFoundInNamespace.
2023-01-31 13:01:39 +01:00
Patrick Ohly
4740d34edb e2e: consolidate checking a pod list
WaitForPods is now a generic function which lists pods and then checks the pods
that it found against some provided condition. A parameter determines how many
pods must be found resp. match the condition for the check to succeed.
2023-01-31 07:52:26 +01:00
Patrick Ohly
b3366ce895 e2e storage: remove WaitForPodTerminatedInNamespace
Calling WaitForPodTerminatedInNamespace after testFlexVolume is useless because
the client pod that it waits for always gets deleted by testVolumeClient:

0fcc3dbd55/test/e2e/framework/volume/fixtures.go (L541-L546)

Worse, because WaitForPodTerminatedInNamespace treats "not found" as "must keep
polling", these two tests always kept waiting for 5 minutes:

    Kubernetes e2e suite: [It] [sig-storage] Flexvolumes should be mountable
    when non-attachable 	6m4s

The only reason why these tests passed is that WaitForPodTerminatedInNamespace
used to return the "not found" API error. That is not guaranteed and about to
change.
2023-01-31 07:52:26 +01:00
Kubernetes Prow Robot
f9a3fd2810
Merge pull request #115346 from gnufied/set-staging-path-expansion
Set node_stage_path whenever available
2023-01-30 21:38:47 -08:00
Kubernetes Prow Robot
3244ebd532
Merge pull request #113973 from my-git9/invalidurl
fix invalid url
2023-01-30 18:42:48 -08:00
Kubernetes Prow Robot
2eb2c88b1d
Merge pull request #109869 from mauriciopoppe/ephemeral-generic-patch-sc
Skip Generic Ephemeral Volume tests if VolumeBindingMode is immediate and it's a multi-topology environment
2023-01-30 16:20:48 -08:00
Kubernetes Prow Robot
d863d04adc
Merge pull request #114580 from pohly/e2e-ginkgo-timeout-fixes
e2e ginkgo timeout fixes, III
2023-01-30 13:48:48 -08:00
Hemant Kumar
32851bb316 Add e2e for node expansion with missing staging path 2023-01-27 16:51:21 -05:00
David Porter
6cb022ff4a test: Update Host Exec to support node e2e
Node E2E tests do not run a scheduler, so the host exec pod must have
the `spec.nodeName` set explicitly.

Signed-off-by: David Porter <david@porter.me>
2023-01-26 00:37:01 -08:00
Patrick Ohly
bc6c7fa912 logging: fix names of keys
The stricter checking with the upcoming logcheck v0.4.1 pointed out these names
which don't comply with our recommendations in
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments.
2023-01-23 14:24:29 +01:00
Kubernetes Prow Robot
5a3540f462
Merge pull request #114825 from pohly/e2e-pod-consistently-pending
e2: fix check of "pod is consistently pending"
2023-01-22 12:56:02 -08:00
Kubernetes Prow Robot
b0ed87078e
Merge pull request #115113 from smarterclayton/exponential_context
wait: ExponentialBackoffWithContext should take context-aware fn
2023-01-20 07:38:15 -08:00