Commit Graph

259 Commits (e736ef71df905af3c2ca6a5da8215dfa6b205def)

Author SHA1 Message Date
Xun Jiang 98baaa9e2f Add file system group setting for deployment and pod used in E2E test.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-05-19 11:30:44 +08:00
danfengliu 72142a9f0f
Merge pull request #6278 from qiuming-best/e2e-context
Adjust E2E context
2023-05-18 09:50:09 +08:00
Xun Jiang/Bruce Jiang 7417e5b5f7
Make the E2E testing pods obey the restricted pod security standard. (#6279)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2023-05-17 10:25:38 -04:00
Ming 54d6cffb45 Adjust E2E context
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-17 14:05:15 +00:00
qiuming 7ed286d886
Merge pull request #6274 from qiuming-best/e2e-time-optimize
Adjust Sleep time in E2E
2023-05-17 15:59:03 +08:00
lyndon 5b75f35262
Add data mover CRD under v2alpha1 (#6176)
* add data mover CRD under v1alpha1

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* data mover CRDs to v2alpha1

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* data mover crd changes

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-05-16 15:09:54 -04:00
Ming c12a0ac731 Adjust Sleep time in E2E
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-16 03:33:51 +00:00
Ming a16c17b1e3 Adjust E2E test codes
Signed-off-by: Ming <mqiu@vmware.com>
2023-05-15 03:28:56 +00:00
qiuming a88163f308
Merge pull request #6198 from danfengliu/fix-context-withconcel-issue
Fix context issues for several E2E tests
2023-05-05 11:20:34 +08:00
danfengl 5f5db2eaca Fix context issues for several E2E tests
1. Fix context issues produced by previous PR, increase timeout or add case scpoed global timeout param to make  backup/restore command timeout configurable.
2. Add global param for storage class name using by test cases;
3. Fix param DefaultVolumesToFsBackup usage issue: set DefaultVolumesToFsBackup to false in backup CLI  in case it was set to true in install CLI.
4. Make namespace names of each namespace mapping test unique from being interfered by each other.

Signed-off-by: danfengl <danfengl@vmware.com>
2023-05-05 02:09:21 +00:00
Xun Jiang 180cc4e31d Enable linter revive and resolve found errors: part 1
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 23:15:15 +08:00
Xun Jiang/Bruce Jiang 51c67089f5
Merge branch 'main' into linter_staticcheck
Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
2023-04-25 15:49:05 +08:00
Xun Jiang cb0ada1e1c Enable staticcheck and resolve found issues.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-25 11:33:40 +08:00
Xun Jiang/Bruce Jiang 980106dc39
Merge pull request #6154 from kaovilai/govet
fix go vet warnings
2023-04-25 09:24:30 +08:00
qiuming b38ee8ad41
Optimize APIGroup E2E test case (#6174)
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-24 17:38:30 -04:00
Tiger Kaovilai d6848ffb16 Self contain context in each high level function rather than passing around in structs
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 14:22:04 -04:00
Tiger Kaovilai 3f4b258dee defer ctxCancel
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 13:33:43 -04:00
Tiger Kaovilai da0f5d5850 Field labels for Duration, Time, client.ObjectKey, KibishiiData, VeleroCLI2Version
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2023-04-16 12:34:28 -04:00
Ming e4c05f2ddf Merge branch 'main' of https://github.com/qiuming-best/velero into resource-policies-e2e 2023-04-14 04:08:52 +00:00
danfengl 504b1cba30 Add E2E test for schedule backup creation principle
Signed-off-by: danfengl <danfengl@vmware.com>
2023-04-12 10:31:20 +00:00
Ming 45a639b16c Add resource policies E2E test
Signed-off-by: Ming <mqiu@vmware.com>
2023-04-12 02:04:01 +00:00
danfengl 35bf7a085d Bumpup upgrade test path for v1.11
Signed-off-by: danfengl <danfengl@vmware.com>
2023-04-07 07:21:40 +00:00
Xun Jiang fc692c49e6 Update Golang version to v1.19 for branch main.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-04-04 12:00:19 +08:00
qiuming c9af70aff3
Merge pull request #6047 from danfengliu/debug-azure-issue
Add changing PVC selected node E2E test
2023-03-29 09:58:16 +08:00
danfengl 112775f924 Add changing PVC selected node E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2023-03-29 01:36:45 +00:00
Xun Jiang 478fb27a0e E2E test can read VC credential secret according to vSphere CSI driver version.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-03-28 11:18:49 +08:00
danfengl 096330df16 Add wait time for migration on vsphere pipeline
Signed-off-by: danfengl <danfengl@vmware.com>
2023-03-24 09:29:20 +00:00
qiuming 4de4d37833
Merge pull request #5915 from danfengliu/add-changing-sc-e2e-test
Add E2E test of PV/PVC storage class can be changed during restores
2023-03-22 15:52:50 +08:00
杨刚 (成都) ad9c6e8dee
delete io/ioutil package. (#5955)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-03-16 09:25:58 +08:00
Xun Jiang/Bruce Jiang 6d8f086283
Merge pull request #5956 from Lyndon-Li/issue-fix-5935
Fix issue 5935
2023-03-09 15:28:47 +08:00
Lyndon-Li 40aae5ebdd fix issue 5935
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2023-03-09 14:24:51 +08:00
danfengl 44a065bd3f Turn Velero debug log flag on
Signed-off-by: danfengl <danfengl@vmware.com>
2023-03-07 04:07:55 +00:00
danfengl 8c7363d6a7 Add E2E test of changing PV and PVC can be changed during restores
Signed-off-by: danfengl <danfengl@vmware.com>
2023-02-24 09:54:55 +00:00
danfengl 979fb9ccab Roll back pkg client code for Velero server
Signed-off-by: danfengl <danfengl@vmware.com>
2023-02-22 14:11:02 +00:00
danfengl beed887eeb Add snapshotvolumes default behavior E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2023-02-19 09:05:20 +00:00
Fish-pro ef05af13bf
Clean up unused variables and functions (#5818)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-09 10:53:24 +08:00
Scott Seago 0be05c9bc8
Merge pull request #5788 from blackpiglet/enable_staticcheck
Enable staticcheck linter. Disable check for folder /pkg and /test by…
2023-02-08 19:26:22 -05:00
Fish-pro a761111ba1
Optimize string contrast judgment (#5821)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-06 14:52:01 +08:00
Fish-pro 843c70959f
Clean up unnecessary convert (#5819)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-06 14:50:31 +08:00
Xun Jiang 955eec7033 Enable staticcheck linter. Disable check for folder /pkg and /test by now.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
2023-01-20 13:52:13 +08:00
danfengl 897a5e0bd8 Add sleep before backing up new born CRD
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-30 02:24:45 +00:00
danfengl 3c3f041bc1 Add verification for CRD installation
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-25 03:28:50 +00:00
danfengliu 6eccaa4cf5
Add pause/unpause schedule e2e test (#5609)
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-22 17:38:41 +08:00
danfengl 78dae45c52 Update upgrade test for 1.10
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-10 03:18:01 +00:00
danfengl a411130256 debug opt in out
Signed-off-by: danfengl <danfengl@vmware.com>
2022-11-10 02:53:58 +00:00
Xun Jiang/Bruce Jiang efcb63a20d
Fix GCP StorageClass used for E2E testing's YAML syntax error. (#5536)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
2022-11-03 10:55:59 +08:00
danfengliu 11a7c796eb
Fix label naming issue for restore helper (#5469)
Signed-off-by: danfengl <danfengl@vmware.com>
2022-10-20 17:49:51 +08:00
lyndon 30b1ca87eb
Merge pull request #5313 from gliptak/go8
Bump Go to 1.18
2022-10-18 12:17:37 +08:00
lyndon d52ec8c079
Pod Volume Backup/Restore Refactor: Rename Init Helper (#5432)
* restore helper refactor

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* resolve codespell

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-17 13:42:09 +08:00
danfengl cf32cabddd fix-ctx-issue
1. Fix issue of kubectl client and server mismatch version in GitAction E2E job, refer to https://github.com/elastic/cloud-on-k8s/issues/4737;
2. Adapt to the changing of keyword for involing Kpoia as fs backupper, new installtion breaked upgrade and migration tests;
3. Accept multi-labels of Ginkgo focus as input of E2E make command;
4. Distinguish workload namespace from each tests;
5. Fix issues of not using Velero util to perform Velero commands;
6. Add snapshot test case for NamespaceMapping E2E test;
7. Collect debug bundle after catching error of Velero backup or restore command;
Signed-off-by: danfengl <danfengl@vmware.com>
2022-10-16 13:18:39 +00:00
lyndon 83ea1cc58b
rename daemonset (#5390)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-10-11 14:18:21 +08:00
danfengl e699a3e9f2 Fix issues of E2E test for API group, migration and pv opt-out backup
1. One of API group test failed due to other PR with fix for treat PartiallyFailed as failure to collect debugbundle without wrap the origin error;
2. Fix migration test issue of wrong velero cli for backup commmand;
3. Fix wrong pararmeter name issue for pv opt-out backup test.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-29 13:53:42 +00:00
danfengliu 5631c7c9df
Merge pull request #5331 from danfengliu/add-opt-in-opt-out-pv-to-e2e-test
Add backup opt-in/opt-out E2E test
2022-09-26 21:43:59 +08:00
danfengl 09240a269b Add Kopia support for Velero installation in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-24 04:27:24 +00:00
danfengl 081b70d0eb Add backup opt-in/opt-out E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-23 09:29:32 +00:00
qiuming 66f6365988
Merge pull request #5355 from danfengliu/add-schedule-backup-timing-e2e-test
Add schedule backup timing E2E test
2022-09-23 15:51:47 +08:00
lyndon c81f0db886
rename pvbr param (#5370)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-09-23 09:13:36 +08:00
danfengl fdc23832cc Fix issue of fail to get command output for test verification
When running velero backup/restore command, if the command result is "PartiallyFailed", it won't reture error as design, but we do need to know the debug information to figure out the reason, so the command output is needed to get the command result, then further action will be taken.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-21 02:47:32 +00:00
danfengl 80430542df Add schedule backup timing E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-09-21 02:32:26 +00:00
Gábor Lipták 648d56e541 Bump Go to 1.18
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2022-09-17 13:11:09 -04:00
danfengl e6c94af358 Add enable API group on k8s resources E2E test upon issue #5146
Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-29 09:44:17 +00:00
danfengl 6e8061266c Clean backups after each test and fix exlude label test issue
1. Clean backups after each test to avoid exceeding limitation of storage capability during E2E test;
2. Fix exlude label test issue that namespace should not be included and excluded at the same time no matter by which way to config.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-19 01:24:06 +00:00
lyndon 775943c858
code spell check (#5230)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2022-08-18 18:17:39 +08:00
danfengl c8544ea212 Add namespace- mappping E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-11 13:24:51 +00:00
danfengl fb445b3c0d Add migration E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-08-09 08:31:39 +00:00
danfengl b9fe1539f0 Wait for pod running status before timeout despite errors of accessing API server
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-21 08:03:18 +00:00
Xun Jiang/Bruce Jiang d4083fe3e2
Merge pull request #4996 from danfengliu/fix-bsl-deletion-test-bucket-issue
Fix wrong bucket issue in BSL deletion E2E test
2022-06-14 16:32:34 +08:00
danfengl 0c069b3098 Bumpup plugin version for Velero 1.9 E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-14 08:22:31 +00:00
danfengl 0d9af1017b Fix wrong bucket issue in BSL deletion E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-14 08:14:12 +00:00
danfengl 463202951d Enhance checkpoint of bsl deletion
Signed-off-by: danfengl <danfengl@vmware.com>
2022-06-13 08:32:31 +00:00
Ming c2ddc6ead4 Fix ordered resources cmd Stdout already set error
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-09 03:52:34 +00:00
Daniel Jiang 59c2eaf3dd
Merge pull request #4968 from blackpiglet/4949-backups-deletion-restic-failure
Fix E2E test [Backups][Deletion][Restic] on GCP
2022-06-08 10:58:47 +08:00
Xun Jiang febe79f334 Fix E2E test [Backups][Deletion][Restic] on GCP.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-06-08 09:23:58 +08:00
Ming 56f72797db Fix nightly running failure
Signed-off-by: Ming <mqiu@vmware.com>
2022-06-06 06:47:01 +00:00
Wenkai Yin(尹文开) 51de990a8a
Merge pull request #4913 from qiuming-best/order-resources-test
Add schedule ordered resources E2E test
2022-05-18 16:32:35 +08:00
Ming 6b9b13790e Add schedule ordered resources test
Signed-off-by: Ming <mqiu@vmware.com>
2022-05-17 14:10:05 +00:00
danfengl 18621a0e13 Add setting TTL in backup E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-05-13 06:52:47 +00:00
danfengl 33bf59a910 Add snapshot checkpoint for CSI E2E test and fix CSI snapshot name issue
1. Add checkpoint in snapshot E2E test to verify snapshot CR should be created and snapshot should be created in cloud side after backup completion;
2. Fix snapshot name issue that CSI snapshot name in cloud side is not the same with other non-CSI cloud snapshots;

Signed-off-by: danfengl <danfengl@vmware.com>
2022-05-07 08:49:34 +00:00
danfengl 7b35f94f84 Add debug switcher for E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-04-06 06:50:47 +00:00
danfengl 658699636d Support CSI plugin in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-04-01 11:26:26 +00:00
danfengl 2c5c9246e6 Add CSI plugin in E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-30 13:09:26 +00:00
danfengl 54a0ee6496 Support multi-upgrade-path in upgrade E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-30 07:39:24 +00:00
Xun Jiang fa646888ef Add parameter for e2e test to support modify kibishii install path.
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-27 20:33:26 +08:00
Wenkai Yin(尹文开) 38c83d608a
Merge pull request #4736 from danfengliu/add-e2e-test-of-bsl-deletion
Add E2E test of bsl deletion
2022-03-23 14:34:00 +08:00
danfengl 09cdf41d97 Add E2E test of bsl deletion
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-15 02:27:09 +00:00
Xun Jiang d694d40919 Support multiple skip option for E2E test
The GINKGO_SKIP option is updated to string that can be separated by "." for "make test-e2e".

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-03-08 17:04:32 +08:00
Wenkai Yin(尹文开) f2542ba123
Merge pull request #4664 from danfengliu/add-e2e-verify-snapshot-in-vsl
Add e2e test to verify snapshot in vsl
2022-03-02 15:10:20 +08:00
danfengl 4ebf764ddc Add e2e for verify snapshto in VSL
Signed-off-by: danfengl <danfengl@vmware.com>
2022-03-01 02:13:55 +00:00
Xun Jiang 9cb81d825e Add skip case support in e2e test
Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-23 14:05:22 +08:00
Xun Jiang 9419aa91a7 Update e2e test image to gcr.io
By now, only busybox:latest is used by e2e. It is already upload to gcr.io/velero-gcp/busybox:latest
Change the image to gcr.io to avoid pulling rate limitation from docker hub.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2022-02-14 20:55:34 +08:00
Ming 6a61a418ca Fix E2E backup namespaces test
Signed-off-by: Ming <mqiu@vmware.com>
2022-02-14 17:41:28 +08:00
danfengl 7c4bd099d9 Change 1.8 plugins version to release version
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-29 10:11:17 +00:00
danfengl f757540c6d Fix E2E gcp plugin tag name
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-29 09:33:41 +00:00
danfengl 33219e6c4c Add 1.8 plugins map in e2e test
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-29 09:14:36 +00:00
Ming e4046017db E2E SSR test add retry mechanism and logs
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-28 18:51:46 +08:00
Ming caa80db92c Add E2E test of backups sync from BSL
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-19 15:09:02 +08:00
Ming f36161eeee E2E test on ssr object with controller namespace mix-ups
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-13 14:10:37 +08:00
danfengl 2a492ded94 Fix E2E upgrade parameter issue caused by previous PR
Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-11 07:23:01 +00:00
danfengl 3af149afae Bump up velero version in upgrade test
Velero 1.8 is releasing soon, upgrade test covers the last release version to the main code.

Signed-off-by: danfengl <danfengl@vmware.com>
2022-01-09 02:38:07 +00:00
Ming 97b106d1a3 Fix e2e 2500 namespaces scale test timeout problem
Signed-off-by: Ming <mqiu@vmware.com>
2022-01-04 15:24:14 +08:00
Wenkai Yin(尹文开) 3feb259235
Merge pull request #4401 from danfengliu/add-backup-deletion-e2e-test-to-main
Add backup deletion e2e test
2021-12-24 16:04:08 +08:00
danfengl 29b2cd1883 Add backup deletion e2e test
Test case description is "Deleted backups are deleted from object storage and backups deleted from object storage can be deleted locally",
in this test, only resource backup objects are target for verifition, restic repo verification is not included in this PR, and snapshot verification will be in later PR

Signed-off-by: danfengl <danfengl@vmware.com>
2021-12-23 12:45:31 +00:00
Ming be752dd8d9 Add rbac and annotation test cases
Signed-off-by: Ming <mqiu@vmware.com>
2021-12-16 18:02:24 +08:00
qiuming e350ce5bb4
Merge pull request #4440 from qiuming-best/upgrade-e2e-vsphere-plugin
Upgrade e2e test vsphere plugin
2021-12-16 09:45:06 +08:00
Ming d8b1ed7dba Upgrade e2e test vsphere plugin
Signed-off-by: Ming <mqiu@vmware.com>
2021-12-15 17:44:57 +08:00
Xun Jiang 706d142096 fix: remove --crds-version in velero install command
Due to only v1 CRD is supported in velero version 1.8, remove CRDs version choosing option.

Signed-off-by: Xun Jiang <jxun@vmware.com>
2021-12-13 21:02:56 +08:00
ming qiu d1e2c7b476 Fix e2e test failures for the inappropriate optimaze of velero install
Signed-off-by: ming qiu <mqiu@mqiu-a01.vmware.com>
2021-12-10 11:10:51 +08:00
ming qiu c58fc1445e Limit backup namespaces on test resource filtering cases
Signed-off-by: ming qiu <mqiu@mqiu-a01.vmware.com>
2021-12-09 11:48:32 +08:00
Ming 0c8063cfd2 Add resoure filtering test cases
Signed-off-by: Ming <mqiu@vmware.com>
2021-12-04 22:47:46 +08:00
ming qiu 58325050ec Adjust structure of e2e test codes
Put every test moduels into seperate packages and all velero install parameters integrated into one struct

Signed-off-by: Ming <mqiu@vmware.com>
2021-11-22 15:57:58 +08:00
danfengl e09837cc4c Fix snapshot e2e test issue of jsonpath
Signed-off-by: danfengl <danfengl@vmware.com>
2021-11-18 08:54:57 +00:00
Wenkai Yin(尹文开) 27f3a6d8d8
Check the failed phases either when uploading the snapshot in E2E testing (#4162)
When the snapshot uploading is failed, it should not be treat as completed and continue.
This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-11-09 17:13:30 -08:00
Wenkai Yin(尹文开) eb332e6a77 Specify the "--snapshot-volumes=false" option explicitly when running backup with Restic
If the "--snapshot-volumes=false" isn't specified explicitly, the vSphere plugin will always take snapshots for the volumes even though the "--default-volumes-to-restic" is specified
This can be removed if the logic of vSphere plugin changes

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-09-22 22:01:11 +08:00
danfengliu 8827b4f1d9
Fix plugins incompatible issue in upgrade test (#4141)
In upgrade test, both original and to-be-upgrading velero installation should use the compatible plugins, but currently, plugin value is determined by provider.

Signed-off-by: danfengl <danfengl@vmware.com>
2021-09-21 19:39:35 -07:00
danfengl f00ad306bb Recovery the workround for aws pending issue
Signed-off-by: danfengl <danfengl@vmware.com>
2021-09-19 01:27:13 +00:00
Wenkai Yin(尹文开) 64229ed57c Use velero debug command to dump the logs when case failed
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-09-15 21:36:56 +08:00
danfengl 4db866a0b2 Add upgrade test into E2E tests
Signed-off-by: danfengl <danfengl@vmware.com>
2021-09-08 13:16:53 +00:00
Daniel Jiang 8abc80ec41
Merge pull request #4082 from reasonerjt/refine-e2e
Enhance e2e test
2021-09-01 10:12:25 +08:00
Wenkai Yin(尹文开) 8d57215ded
Several fixes to improve the stability of E2E testing (#4056)
1. Support to customize the restic restore helper image
2. Use a seperated context when doing the clean up works
3. Wait a while before doing the the restore for aws to avoid #1799

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-31 12:50:38 -04:00
Daniel Jiang 70a8a5d54d Enhance e2e test
1. Check the error when waiting for restice daemonset to be ready, so
   the timeout will be reported
2. Add support for gcp provider and fail early if the provider is
   unknown

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-08-31 21:01:21 +08:00
Daniel Jiang 74476db9d7
Merge pull request #4064 from kahirokunn/main
fixes for CVE-2021-3121 and CVE-2021-3580
2021-08-30 18:33:18 +08:00
Wenkai Yin(尹文开) a9f411d27a Install/uninstall velero by CLI in the E2E test case
Do this for two reasons:
1. Verify the functionalities for installation and uninstllation of CLI
2. We want to add upgrade test case which needs to install different versions of velero, calling libraries is impossible for this

fixes #4062

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-26 09:32:29 +08:00
kahirokunn 0eda0ec8b9 fixes for CVE-2021-3121 and CVE-2021-3580
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
2021-08-24 17:08:20 +09:00
Wenkai Yin(尹文开) 31a8e5080c
Wait the namespace deletion completed before removing the CRDs (#4007)
Wait the namespace deletion completed before removing the CRDs when uninstalling the velero

Fixes #3974

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-17 08:55:22 -07:00
Wenkai Yin(尹文开) d913f83c72
Fix the random failure of E2E test cases (#4005)
Fix the random failure by increasing the timeout and introducing few minor refactor/bug fixes

Fixes #3970

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-08-12 09:44:24 +08:00
Bridget McErlean d98c65f69e
Use appropriate CRD API during readiness check (#4015)
* Use appropriate CRD API during readiness check

The readiness check for the Velero CRDs was still using the v1beta1 API.
This would cause the readiness check to fail on 1.22 clusters as the
v1beta1 API is no longer available. Previously, this error would be
ignored and the installation would proceed, however with #4002, we are
no longer ignoring errors from this check.

This change modifies the CRD readiness check to check the CRDs using the
same API version that was used when submitting the CRDs to the cluster.
It also introduces a new CRD builder using the V1 API for testing.

This change also fixes a bug that was identified in the polling code
where if the CRDs were not ready on the first polling iteration, they
would be added again to the list of CRDs to check resulting in
duplicates. This would cause the length check to fail on all subsequent
polls and the timeout would always be reached.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>

* Remove duplicate V1 CRD builder and update comment

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-08-05 15:17:14 -04:00
Wenkai Yin(尹文开) b84ce9b6aa Patch the resources of velero and kibishii when running E2E testing
Add the image pull secret to the service account when deploying velero and kibishii to avoid the image pull limit issue of Docker Hub

Fixes #3966

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-07-29 11:38:57 +08:00
Scott Seago 2c46b47404 enable e2e tests to choose crd apiVersion
Signed-off-by: Scott Seago <sseago@redhat.com>
2021-07-28 17:40:30 -04:00
Wenkai Yin(尹文开) df65754c54
Control the name of backup used in E2E test to avoid issue on vSphere (#3985)
The backup name must be no more than 63 characters otherwise we'll get error on vSphere platform:
Failed to create snapshot record: Snapshot.backupdriver.cnsdp.vmware.com \"snap-8945e7df-069e-4f56-aeb5-75b1dd87547f\" is invalid: metadata.labels: Invalid value: \"backup-bsl-e7a1d0f3-2f29-4d80-9184-6214dac91d96-e7a1d0f3-2f29-4d80-9184-6214dac91d96\": must be no more than 63 characters"

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-07-28 15:28:27 +08:00
Jai Subash Devmane 36b1aaa99d
Fixing multipleNamespaceTest bug - Missing expect statement in test (#3983)
* Fixing multipleNamespaceTest bug - No expect statement in test
* adding changelog

Signed-off-by: Jai Subash Devmane <jdevmane@redhat.com>
2021-07-27 15:32:36 +08:00
Daniel Jiang e555588a93
Merge pull request #3986 from ywk253100/210726_plugin_version
Bump up vSphere plugin version to v1.1.1
2021-07-26 16:50:32 +08:00
Wenkai Yin(尹文开) 1d2750b86c Bump up vSphere plugin version to v1.1.1
Bump up vSphere plugin version to v1.1.1 to avoid the issue https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/290

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-07-26 10:37:03 +08:00
Wenkai Yin(尹文开) 6a0267d4e9 Generate test report for the E2E testing
Generate test report for the E2E testing so that we can check the test result in the automation pipelines easily

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-07-26 09:49:42 +08:00
Jai Subash Devmane db375f34c1 Fix -install-velero flag for e2e tests
Signed-off-by: Jai Subash Devmane <jdevmane@redhat.com>
2021-07-02 17:21:36 -04:00
Wenkai Yin(尹文开) bb05ed390b Enable the E2E test on Github Action
1. Run the E2E test with kind(provision various versions of k8s cluster) and MinIO on Github Action
2. Bug fix: the variable "stdoutBuf" is assigned to both "installPluginCmd.Stdout" and "installPluginCmd.Stderr", this causes 'if !strings.Contains(stderrBuf.String(), "Duplicate value")' takes no effect as the "stderrBuf.String()" is always empty
3. Print the stdout and stderr for easy debugging

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-06-30 21:45:26 +08:00
Scott Seago 962a957f1b
regression introduced in 1.6 restore progress: fix CR restore (#3845)
Signed-off-by: Scott Seago <sseago@redhat.com>
2021-06-19 00:03:11 -07:00
David L. Smith-Uchida d871370c1e
Added multiple namespace test (#3763)
Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-06-17 11:23:12 -07:00
codegold79 c21b66166a
API groups e2e tests remove controllers (#3564)
* Remove controllers and sleeps in API groups e2e tests

Signed-off-by: F. Gold <fgold@vmware.com>

* Print command in AfterEach(...) and check error

Signed-off-by: F. Gold <fgold@vmware.com>

* Make change ahead of PR3764 changes in main

Signed-off-by: F. Gold <fgold@vmware.com>

* Update go.{mod,sum} files

Signed-off-by: F. Gold <fgold@vmware.com>

* Run make update

Signed-off-by: F. Gold <fgold@vmware.com>
2021-06-17 10:50:59 -07:00
Alay Patel 888de9fe46 fix typos for code spell test
Signed-off-by: Alay Patel <alay1431@gmail.com>
2021-06-11 00:13:50 -04:00
Carlisia Thompson 81f1f21871
Consolidate api clients for e2e tests (#3764)
* Consolidate api clients
* Adress Nolan reviews
* Adding back output warning for consistency
* Remove unnecessary documentation
* Address Bridget's reviews
* Update go.sum files

Signed-off-by: Carlisia <carlisia@grokkingtech.io>
Co-authored-by: Bridget McErlean <bmcerlean@vmware.com>
2021-06-09 22:07:56 +08:00
David L. Smith-Uchida 4d173d725c
Changed kibishii wait commands to output stdout/stderr, makes for better debugging (#3762)
Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-05-10 09:30:41 -04:00
Carlisia Thompson ccac3d4130
A small refactor of the e2e tests (#3726)
* A small refactor of the e2e tests

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Add copyright header

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Fix CI

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Revert unneeded changes

Signed-off-by: Carlisia <carlisia@grokkingtech.io>

* Remove file that doesnt belong here

Signed-off-by: Carlisia <carlisia@grokkingtech.io>
2021-04-28 09:54:17 -07:00
David L. Smith-Uchida 6a6734789e
Merge pull request #3618 from carlisia/c-uninstall
Make uninstall more robust and informative
2021-03-25 19:13:01 -07:00
David L. Smith-Uchida 242fba9c05
Runs vSphere tests with snapshots (#3629)
Added wait for vSphere plug-in uploads to complete

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-25 17:46:57 -04:00
Carlisia 61c891f055 Addressed Dave's review
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-25 13:24:30 -07:00
Carlisia 4fff2a4a5c Make uninstall more robust and informative
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-23 18:00:38 -07:00
David L. Smith-Uchida e9c997839e
Added volume snapshot test for backup/restore. (#3592)
Snapshot tests can be run with Ginkgo focus "Snapshot" and restic tests with Ginkgo focus "Restic".
Restic and volume snapshot tests can now be run simultaneously.
Added check for kibishii app start after restore.
Consolidated kibishii pod checks into waitForKibishiiPods.
Added WaitForPods function to e2e/tests/common.goSnapshot tests are skipped automatically on kind clusters.
Fixed issue where velero_utils InstallVeleroServer was looking for the Restic daemon set in the "velero" namespace only (was ignoring io.Namespace)

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-17 14:38:47 -04:00
Carlisia c032f12232 Upgrade e2e tests to new plugin versions (v1.2)
Signed-off-by: Carlisia <carlisia@vmware.com>
2021-03-15 16:06:16 -07:00
Bridget McErlean 70287f00f9
Install plugins for additional BSL in E2E test (#3582)
The test for multiple credentials assumed that the plugin for the
additional BSL provider was already installed. This will not be the case
when performing a clean install of Velero between tests.

This adds a new utility function to add the plugins that are necessary
for the additional BSL provider. It doesn't check which plugins are
already installed, it will just attempt to install and if the stderr
contains the message that it is a duplicate plugin, we ignore the error
and continue. This could be improved by instpecting the output from
`velero plugin get` but I opted for a quicker solution given the
upcoming release.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-14 23:23:41 -07:00
David L. Smith-Uchida b191140cf1
Updated Azure plugin in e2e tests to 1.1.2 (latest) (#3585)
Updated vSphere plugin in e2e tests to 1.1.0 (latest)

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
2021-03-14 23:21:05 -07:00