Skip to content

Add e2e test case for PR 9255#9564

Open
hollycai05 wants to merge 2 commits intovmware-tanzu:mainfrom
hollycai05:add-e2e-tests-for-PR9255
Open

Add e2e test case for PR 9255#9564
hollycai05 wants to merge 2 commits intovmware-tanzu:mainfrom
hollycai05:add-e2e-tests-for-PR9255

Conversation

@hollycai05
Copy link

@hollycai05 hollycai05 commented Feb 26, 2026

Thank you for contributing to Velero!

Please add a summary of your change

Add e2e test case for PR 9366:
Wildcard ns implement

Does your change fix a particular issue?

Fixes #(issue)
#9255

Please indicate you've done the following:

Signed-off-by: dongqingcc <[email protected]>
@blackpiglet blackpiglet self-requested a review February 26, 2026 09:29
@hollycai05 hollycai05 marked this pull request as draft February 26, 2026 09:37
@blackpiglet blackpiglet added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.64%. Comparing base (8b55592) to head (d315bca).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9564      +/-   ##
==========================================
- Coverage   60.65%   60.64%   -0.01%     
==========================================
  Files         386      387       +1     
  Lines       36477    36518      +41     
==========================================
+ Hits        22124    22146      +22     
- Misses      12771    12783      +12     
- Partials     1582     1589       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hollycai05 hollycai05 force-pushed the add-e2e-tests-for-PR9255 branch from 93eeb1c to d315bca Compare March 5, 2026 05:46
@hollycai05
Copy link
Author

Velero test on backup/restore with wildcard namespaces Run E2E test case [ResourceFiltering, WildcardNamespaces]
/root/velero/test/e2e/test/test.go:95
Running case:  Should correctly filter namespaces using wildcards during both backup and restore stages
Running test case Backup and restore with wildcard namespaces 2026-03-05 05:44:20
Install Velero for test case wildcard-ns-53419099: 2026-03-05 05:44:20velero is ready for case wildcard-ns-53419099 
CreateResources 2026-03-05 05:44:20
  STEP: Creating namespace wildcard-ns-53419099-inc-both @ 03/05/26 05:44:20.302
  STEP: Creating ConfigMap configmap-wildcard-ns-53419099-inc-both in namespace wildcard-ns-53419099-inc-both @ 03/05/26 05:44:20.309
  STEP: Creating namespace wildcard-ns-53419099-exact @ 03/05/26 05:44:20.314
  STEP: Creating ConfigMap configmap-wildcard-ns-53419099-exact in namespace wildcard-ns-53419099-exact @ 03/05/26 05:44:20.318
  STEP: Creating namespace wildcard-ns-53419099-inc-exc @ 03/05/26 05:44:20.325
  STEP: Creating ConfigMap configmap-wildcard-ns-53419099-inc-exc in namespace wildcard-ns-53419099-inc-exc @ 03/05/26 05:44:20.328
  STEP: Creating namespace wildcard-ns-53419099-test-bak @ 03/05/26 05:44:20.333
  STEP: Creating ConfigMap configmap-wildcard-ns-53419099-test-bak in namespace wildcard-ns-53419099-test-bak @ 03/05/26 05:44:20.34
Backup 2026-03-05 05:44:20
  STEP: Start to backup ...... @ 03/05/26 05:44:20.344
velero cmd =/root/velero/test/../_output/bin/linux/amd64/velero create --namespace velero backup backup-wildcard-ns-53419099 --include-namespaces wildcard-ns-53419099-inc-*,wildcard-ns-53419099-test-*,wildcard-ns-53419099-exact,non-existent-ns-* --exclude-namespaces wildcard-ns-53419099-test-bak --default-volumes-to-fs-backup --wait
Backup request "backup-wildcard-ns-53419099" submitted successfully.
Waiting for backup to complete. You may safely press ctrl-c to stop waiting - your backup will continue in the background.
..
Backup completed with status: Completed. You may check for more information using the commands `velero backup describe backup-wildcard-ns-53419099` and `velero backup logs backup-wildcard-ns-53419099`.
get backup cmd =/root/velero/test/../_output/bin/linux/amd64/velero --namespace velero backup get -o json backup-wildcard-ns-53419099
Destroy 2026-03-05 05:44:23
  STEP: Start to destroy namespace wildcard-ns-53419099...... @ 03/05/26 05:44:23.276
[delete namespace wildcard-ns-53419099-exact]
/usr/local/bin/kubectl delete namespace wildcard-ns-53419099-exact
Output: namespace "wildcard-ns-53419099-exact" deleted

[/usr/local/bin/kubectl get ns /usr/bin/grep wildcard-ns-53419099-exact /usr/bin/awk {print $1}]
kubectl get ns output:
[]
Namespace wildcard-ns-53419099-exact was deleted
[delete namespace wildcard-ns-53419099-inc-both]
/usr/local/bin/kubectl delete namespace wildcard-ns-53419099-inc-both
Output: namespace "wildcard-ns-53419099-inc-both" deleted

[/usr/local/bin/kubectl get ns /usr/bin/grep wildcard-ns-53419099-inc-both /usr/bin/awk {print $1}]
kubectl get ns output:
[]
Namespace wildcard-ns-53419099-inc-both was deleted
[delete namespace wildcard-ns-53419099-inc-exc]
/usr/local/bin/kubectl delete namespace wildcard-ns-53419099-inc-exc
Output: namespace "wildcard-ns-53419099-inc-exc" deleted

[/usr/local/bin/kubectl get ns /usr/bin/grep wildcard-ns-53419099-inc-exc /usr/bin/awk {print $1}]
kubectl get ns output:
[]
Namespace wildcard-ns-53419099-inc-exc was deleted
[delete namespace wildcard-ns-53419099-test-bak]
/usr/local/bin/kubectl delete namespace wildcard-ns-53419099-test-bak
^[fOutput: namespace "wildcard-ns-53419099-test-bak" deleted

[/usr/local/bin/kubectl get ns /usr/bin/grep wildcard-ns-53419099-test-bak /usr/bin/awk {print $1}]
kubectl get ns output:
[]
Namespace wildcard-ns-53419099-test-bak was deleted
Restore 2026-03-05 05:44:58
  STEP: Waiting 5 minutes to make sure the snapshots are ready... @ 03/05/26 05:44:58.085
  STEP: Start to restore ...... @ 03/05/26 05:44:58.085
velero cmd =/root/velero/test/../_output/bin/linux/amd64/velero create --namespace velero restore restore-wildcard-ns-53419099 --from-backup backup-wildcard-ns-53419099 --include-namespaces wildcard-ns-53419099-inc-*,wildcard-ns-53419099-exact,non-existent-ns-* --exclude-namespaces wildcard-ns-53419099-*-exc --wait
Restore request "restore-wildcard-ns-53419099" submitted successfully.
Waiting for restore to complete. You may safely press ctrl-c to stop waiting - your restore will continue in the background.
.....
Restore completed with status: Completed. You may check for more information using the commands `velero restore describe restore-wildcard-ns-53419099` and `velero restore logs restore-wildcard-ns-53419099`.
get restore cmd =/root/velero/test/../_output/bin/linux/amd64/velero --namespace velero restore get -o json restore-wildcard-ns-53419099
Verify 2026-03-05 05:45:03
  STEP: Checking included namespace wildcard-ns-53419099-inc-both exists @ 03/05/26 05:45:03.737
  STEP: Checking included namespace wildcard-ns-53419099-exact exists @ 03/05/26 05:45:03.747
  STEP: Checking namespace wildcard-ns-53419099-test-bak excluded by backup does NOT exist @ 03/05/26 05:45:03.753
  STEP: Checking namespace wildcard-ns-53419099-inc-exc excluded by restore does NOT exist @ 03/05/26 05:45:03.756
Finish run test 2026-03-05 05:45:03
  STEP: Clean namespace with prefix wildcard-ns-53419099 after test @ 03/05/26 05:45:03.759
  STEP: Clean backups after test @ 03/05/26 05:45:03.775
Backup backup-wildcard-ns-53419099 is going to be deleted...
velero cmd =/root/velero/test/../_output/bin/linux/amd64/velero --namespace velero delete backup backup-wildcard-ns-53419099 --confirm
Request to delete backup "backup-wildcard-ns-53419099" submitted successfully.
The backup will be fully deleted after all associated data (disk snapshots, backup files, restores) are removed.
• [43.839 seconds]
------------------------------
SSSSSSSSS
------------------------------
Ran 1 of 64 Specs in 75.513 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 63 Skipped
PASS

@hollycai05 hollycai05 marked this pull request as ready for review March 5, 2026 05:48
@github-actions github-actions bot requested a review from reasonerjt March 5, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-e2e-2tests kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants