Commit Graph

2227 Commits

Author SHA1 Message Date
Patrick Ohly
06d52b7702 CSI: revert introduction of context with cancellation
The traditional behavior of PodIO was to ignore the context. Changing that to
use the canceled context was risky because maybe some cleanup operation after
cancellation of the context wouldn't run anymore when it previously did.

However, this is theoretical. Tests all seemed to pass fine even without this
change.
2026-01-16 07:53:00 +01:00
Patrick Ohly
4a3d822689 DRA e2e: make driver deployment possible in Go unit tests
This leverages ktesting as wrapper around Ginkgo and testing.T to make all
helper code that is needed to deploy a DRA driver available to Go unit
tests and thus integration tests.

How to proceed with unifying helper code for integration and E2E testing is
open. This is just a minimal first step in that direction. Ideally, such
code should be in separate packages where usage of Ginkgo, e2e/framework
and gomega.Expect/Eventually/Consistently are forbidden.

While at it, the builder gets extended to make cleanup optional.
This will be needed for upgrade/downgrade testing with sub-tests.

(cherry picked from commit 7c7b1e1018)
2026-01-16 07:53:00 +01:00
Patrick Ohly
e999d595b1 testing: partial revert of E2E + DRA upgrade/downgrade
Refactoring the DRA upgrade/downgrade testing such that it runs as Go test
depended on supporting ktesting in the E2E framework. That change worked during
presubmit testing, but broke some periodic jobs. Therefore the relevant commits
from https://github.com/kubernetes/kubernetes/pull/135664/commits get reverted:

c47ad64820 DRA e2e+integration: test ResourceSlice controller
047682908d ktesting: replace Begin/End with TContext.Step
de47714879 DRA upgrade/downgrade: rewrite as Go unit test
7c7b1e1018 DRA e2e: make driver deployment possible in Go unit tests
65ef31973c DRA upgrade/downgrade: split out individual test steps
47b613eded e2e framework: support creating TContext

The last one is what must have caused the problem, but the other commits depend
on it.
2026-01-11 09:55:17 +01:00
Kubernetes Prow Robot
26fd963327 Merge pull request #135664 from pohly/dra-upgrade-downgrade-refactor
DRA e2e: upgrade/downgrade refactor
2026-01-08 19:31:47 +05:30
Kubernetes Prow Robot
08ad958d0d Merge pull request #135774 from pohly/e2e-framework-ginkgo-wrappers
E2E framework: make usage of Ginkgo wrappers optional
2026-01-07 19:01:38 +05:30
Patrick Ohly
7c7b1e1018 DRA e2e: make driver deployment possible in Go unit tests
This leverages ktesting as wrapper around Ginkgo and testing.T to make all
helper code that is needed to deploy a DRA driver available to Go unit
tests and thus integration tests.

How to proceed with unifying helper code for integration and E2E testing is
open. This is just a minimal first step in that direction. Ideally, such
code should be in separate packages where usage of Ginkgo, e2e/framework
and gomega.Expect/Eventually/Consistently are forbidden.

While at it, the builder gets extended to make cleanup optional.
This will be needed for upgrade/downgrade testing with sub-tests.
2026-01-07 14:11:33 +01:00
Patrick Ohly
47d02070ba E2E: remove unnecessary trailing spaces in test names
The spaces are unnecessary because Ginkgo adds spaces automatically.

This was detected before only for tests using the wrapper functions,
now it also gets detected for ginkgo methods.
2026-01-07 12:05:43 +01:00
Kubernetes Prow Robot
9f68013b1e Merge pull request #135501 from shivamwayal37/fix/113359-win-snapshot-fs-size
Fix: Use Get-Volume for Windows snapshot size verification
2025-12-22 09:08:31 -08:00
Kubernetes Prow Robot
7d0b8f979c Merge pull request #135629 from jsafrane/selinux-fix-completed-pods
selinux: Fix the controller to ignore finished pods
2025-12-19 11:52:33 -08:00
Jan Safranek
02d4c11b00 Added e2e tests with disabled SELinux
Added few tests with a CSI driver that does not support SELinux and has it
disabled in its CSIDriver instance
2025-12-19 14:45:38 +01:00
hongkang
be9b3d5a46 Add e2e test for VolumeAttachment cleanup when CSIDriver AttachRequired changes
Signed-off-by: hongkang <mzhkcj50@gmail.com>
2025-12-19 15:56:33 +08:00
Kubernetes Prow Robot
f83f687475 Merge pull request #135674 from Phaow/volume-expand
test: Add XFS filesystem support to volume expansion e2e tests
2025-12-18 02:09:25 -08:00
Kubernetes Prow Robot
861e9cde52 Merge pull request #135623 from jsafrane/fix-preemption-e2e
Run RWOP preemption test as serial
2025-12-17 23:28:42 -08:00
Kubernetes Prow Robot
5e5a422b72 Merge pull request #135457 from duanwei33/vol-resize
Fix volume expansion e2e tests to use actual allocated size
2025-12-17 22:35:51 -08:00
Penghao
7e68ec0ffc test: refine vgs resources clean up (#135250)
* test: refine vgs resources clean up

Signed-off-by: Penghao <pewang@redhat.com>

* fix: refine structure

Signed-off-by: Penghao <pewang@redhat.com>

* fix: typo and proper data structure usage

Signed-off-by: Penghao <pewang@redhat.com>

---------

Signed-off-by: Penghao <pewang@redhat.com>
2025-12-17 20:00:09 -08:00
Jan Safranek
4999d9a9e4 selinux: add e2e test with a completed pod
Add a test that checks the SELinux controller does not report conflicts
with Succeeded pods.
2025-12-12 11:17:54 +01:00
Penghao
a9f878111e test: Add XFS filesystem support to volume expansion e2e tests
Signed-off-by: Penghao <pewang@redhat.com>
2025-12-11 02:39:24 +08:00
Shivam Wayal
daa2e07f08 Fix: Use Get-Volume for Windows snapshot size verification
Implement the robust, multi-stage PowerShell Get-Volume logic to accurately
determine the filesystem size of volumes mounted in Windows E2E tests. This
solution replaces the unreliable fsutil utility and resolves persistent
failures (including in CAPZ) caused by fragile parsing and directory mounts.
2025-12-06 23:05:13 +05:30
Jan Šafránek
eb13761338 Update test/e2e/storage/testsuites/readwriteoncepod.go
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2025-12-05 16:07:53 +01:00
Jan Safranek
618bec889d Fix the preemption test
It needs to run as [Serial], so it accidentally does not evict other Pods.

Consider this scenario on a busy clusters, with all nodes at their attachment limit.

1. pod1 of the preemption test runs, pod2 is created.
2. The scheduler evicts pod1. That frees the RWOP volume and it also frees the last attachment slot on the node.
3. Some other e2e tests creates a Pod and scheduler puts it on a node, taking the last attachment slot.
4. The scheduler schedules pod2 agaian and it sees there is no node with a free attachment slot -> new round of eviction, now evicting a pod of unrelated e2e tests. The unrelated test will fail.
2025-12-05 15:26:13 +01:00
duanwei33
8b381028ed Fix volume expansion e2e tests to use actual allocated size 2025-11-27 12:57:04 +08:00
Kubernetes Prow Robot
4c04786f74 Merge pull request #135131 from Dev1622/sig-storage/mock-expand-flake-fix
e2e/storage: deflake CSI Mock volume expansion quota validation
2025-11-26 09:10:36 -08:00
Dev1622
d80e73c0a9 cleanup: removed uncached client plumbing, keeping the sequencing fix for quota validation 2025-11-26 19:56:42 +05:30
Dev1622
f76d0e5aa4 test/e2e: replace forbidden gomega.BeTrue usage with Eventually(...).Should(Succeed()) 2025-11-13 12:39:17 +05:30
Surya Dev
cee5b837da Resolve lint restriction on BeTrue by introducing Succeed() with contextual error messages 2025-11-13 12:39:16 +05:30
Surya
c68b35c4c7 Update vendored dependencies 2025-11-12 22:06:10 +05:30
carlory
2f55207dff Fix volume performance tests with performance constraints
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-11-11 11:37:23 +08:00
Surya Dev
2c81b6e8ad fix: replace BeTrue with BeTrueBecause for better failure message 2025-11-11 07:59:48 +05:30
Kubernetes Prow Robot
478617a559 Merge pull request #135135 from jsafrane/update-csi-manifests
Update CSI manifests from csi-driver-hostpath master
2025-11-06 06:50:54 -08:00
Jan Safranek
6b764d555f test: update MutableCSINodeAllocatableCount tests for the new attacher
The new external-attacher already sets (or clears) VolumeAttachment
Status.Status.AttachError.ErrorCode, based on its feature gate.

Stop patching the VolumeAttachment in an e2e test, but pass the right
feature gate to the external-attacher instead.

And remove local createMergePatch() that's now unused.
2025-11-06 12:31:53 +01:00
Surya Deev
a2dfa0fd73 run gofmt to fix formatting issue 2025-11-06 08:23:23 +05:30
Benjamin Elder
30965ea3ce drop MinimumKubeletVersion for unsupported kubelet versions
Versions 1.20, 1.21, 1.22, 1.23, 1.27 are all well out of support
2025-11-05 14:25:20 -08:00
Kubernetes Prow Robot
3395c5358c Merge pull request #135012 from gnufied/volume-limits-redux-cas
Do not schedule pods to a node without CSI driver
2025-11-05 09:42:58 -08:00
Surya Deev
326b7eaa52 e2e/storage: deflake CSI Mock volume expansion quota validation 2025-11-05 14:36:48 +05:30
upodroid
90f0fd09f2 provision 10G disks for testing pvc instead of 1 byte or 1GB 2025-11-05 01:25:13 +03:00
Penghao
27a81144b2 Add checkpoint for groupsnapshot data consistency (#134637)
* Add checkpoint for groupsnapshot data consistency

Signed-off-by: Penghao <pewang@redhat.com>

* fix: using exist helpers check data consistency

Signed-off-by: Penghao <pewang@redhat.com>

---------

Signed-off-by: Penghao <pewang@redhat.com>
2025-11-04 08:20:15 -08:00
Hemant Kumar
002774c315 Address review comments 2025-11-04 11:16:43 -05:00
Hemant Kumar
713b7231d8 Merely check for presence of CSIdriver object 2025-11-03 17:46:19 -05:00
Hemant Kumar
4bbe8f0cfb Add test that verifies scheduler behaviour 2025-11-03 16:27:01 -05:00
Jan Safranek
321c1e37c0 Update group snapshot tests to v1beta2
Copy VolumeGroupSnapshot v1beta2 CRDs from the external-snapshotter and
disable v1beta1 API in them - we can't run the conversion webhook in e2e
tests easily.

Update e2e tests to use v1beta2.
2025-11-03 17:53:30 +01:00
Kubernetes Prow Robot
3ef0262766 Merge pull request #134760 from Rishita-Golla/resize-test
Add step field in SizeRange struct for volume_expand tests
2025-10-28 14:20:00 -07:00
Kubernetes Prow Robot
f9952b77bd Merge pull request #134879 from gnufied/fix-vac-tests-external
Remove FromName for VAC external tests
2025-10-27 13:21:43 -07:00
Hemant Kumar
62b23aeb0c Remove FromName for VAC external tests
VAC must have one or more parameters defined and hence
you can't just create it from driver's name during e2e testing.
2025-10-27 10:15:32 -04:00
Fabio Bertinatto
b40df46b0b test/e2e: remove unused v1beta.VolumeAttributesClass field 2025-10-27 08:56:02 -03:00
Kubernetes Prow Robot
1135d04f1d Merge pull request #134826 from aramase/aramase/f/kep_5538_beta_impl
CSI driver opt-in for service account tokens via secrets field
2025-10-24 13:57:35 -07:00
Anish Ramasekar
30a6d4b389 Add CSI driver opt-in for service account tokens via secrets field
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-10-24 11:04:02 -07:00
Benjamin Elder
b0a15b9163 switch storage e2e tests from md5 to sha256 2025-10-21 15:25:11 -07:00
Rishita Golla
448584e1c8 feat: add step field and clarify comment for volume expansion 2025-10-21 21:24:45 +00:00
Patrick Ohly
d0a2a0d22e e2e: find and fix reuse of test names
This reports and fixes for test/e2e:

    ERROR: E2E suite initialization was faulty, these errors must be fixed:
    ERROR: apimachinery/mutatingadmissionpolicy.go:184: full test name is not unique: "[sig-api-machinery] MutatingAdmissionPolicy [Privileged:ClusterAdmin] [Feature:MutatingAdmissionPolicy] [FeatureGate:MutatingAdmissionPolicy] [Beta] [Feature:OffByDefault] should support MutatingAdmissionPolicy API operations" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:184, /nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:606)
    ERROR: apimachinery/mutatingadmissionpolicy.go:412: full test name is not unique: "[sig-api-machinery] MutatingAdmissionPolicy [Privileged:ClusterAdmin] [Feature:MutatingAdmissionPolicy] [FeatureGate:MutatingAdmissionPolicy] [Beta] [Feature:OffByDefault] should support MutatingAdmissionPolicyBinding API operations" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:412, /nvme/gopath/src/k8s.io/kubernetes/test/e2e/apimachinery/mutatingadmissionpolicy.go:834)
    ERROR: common/node/pod_level_resources.go:250: full test name is not unique: "[sig-node] Pod Level Resources [Serial] [Feature:PodLevelResources] [FeatureGate:PodLevelResources] [Beta] Guaranteed QoS pod with container resources" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/common/node/pod_level_resources.go:250 (2x))
    ERROR: dra/dra.go:1899: full test name is not unique: "[sig-node] [DRA] kubelet [Feature:DynamicResourceAllocation] [FeatureGate:DRAConsumableCapacity] [Alpha] [Feature:OffByDefault] [FeatureGate:DynamicResourceAllocation] must allow multiple allocations and consume capacity [KubeletMinVersion:1.34]" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/dra/dra.go:1899 (2x))
    ERROR: storage/testsuites/volume_group_snapshottable.go:173: full test name is not unique: "[sig-storage] CSI Volumes [Driver: csi-hostpath] [Testpattern:  (delete policy)] volumegroupsnapshottable [Feature:volumegroupsnapshot] VolumeGroupSnapshottable  should create snapshots for multiple volumes in a pod" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/storage/testsuites/volume_group_snapshottable.go:173 (2x))
    ERROR: storage/testsuites/volume_group_snapshottable.go:173: full test name is not unique: "[sig-storage] CSI Volumes [Driver: pd.csi.storage.gke.io] [Serial] [Testpattern:  (delete policy)] volumegroupsnapshottable [Feature:volumegroupsnapshot] VolumeGroupSnapshottable  should create snapshots for multiple volumes in a pod" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e/storage/testsuites/volume_group_snapshottable.go:173 (2x))

And for test/e2e_node:

    ERROR: cpu_manager_test.go:1622: full test name is not unique: "[sig-node] CPU Manager [Serial] [Feature:CPUManager] when checking the CFS quota management should disable for guaranteed pod with exclusive CPUs assigned" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e_node/cpu_manager_test.go:1622, /nvme/gopath/src/k8s.io/kubernetes/test/e2e_node/cpu_manager_test.go:1642)
    ERROR: eviction_test.go:800: full test name is not unique: "[sig-node] LocalStorageCapacityIsolationFSQuotaMonitoring [Slow] [Serial] [Disruptive] [Feature:LocalStorageCapacityIsolationQuota] [Feature:LSCIQuotaMonitoring] [Feature:UserNamespacesSupport] when we run containers that should cause use quotas for LSCI monitoring (quotas enabled: true)  should eventually evict all of the correct pods" (/nvme/gopath/src/k8s.io/kubernetes/test/e2e_node/eviction_test.go:800 (2x))
2025-10-17 20:19:52 +02:00
Kubernetes Prow Robot
3b632270e9 Merge pull request #134633 from Phaow/add-vgs-csi-e2e
Enable external VolumeGroupSnapshot tests
2025-10-16 08:50:41 -07:00