Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e test #629

Merged
merged 5 commits into from
Jul 12, 2024
Merged

Add e2e test #629

merged 5 commits into from
Jul 12, 2024

Conversation

JacobGros
Copy link
Contributor

Description

This PR adds a e2e test to velero-upgrade branch.
This new test will install AM v1.0.3 and upgrade to v1.1.0. Then it will downgrade AM again.
Adds standalone yaml and sets test file to point to it, to run only this test; we'll need to revert this change before merging velero-upgrade into main, but I left as is in case others want to add/edit tests for velero-upgrade

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Ran the new e2e test
Will run 1 of 1 specs
------------------------------
[BeforeSuite]
/root/csm-operator/tests/e2e/e2e_test.go:78
  STEP: Getting test environment variables @ 07/12/24 17:43:38.267
  STEP: [sanity] @ 07/12/24 17:43:38.267
  STEP: Reading values file @ 07/12/24 17:43:38.267
  STEP: Getting a k8s client @ 07/12/24 17:43:38.275
[BeforeSuite] PASSED [0.015 seconds]
------------------------------
[run-e2e-test] E2E Testing Running all test Given Test Scenarios
/root/csm-operator/tests/e2e/e2e_test.go:118
  STEP: Starting: Install Application Mobility v1.03 and upgrade to v1.1.0  @ 07/12/24 17:43:38.282
  STEP:      Executing  Given an environment with k8s or openshift, and CSM operator installed @ 07/12/24 17:43:38.282
  STEP:      Executing  Set up application mobility CR [testfiles/application-mobility-templates/csm_application_mobility_old.yaml] @ 07/12/24 17:43:38.338
  STEP:      Executing  Set up application mobility CR [testfiles/application-mobility-templates/csm_application_mobility_with_pflex.yaml] @ 07/12/24 17:43:38.447
  STEP:      Executing  Create storageclass with name [op-e2e-vxflexos] and template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex] @ 07/12/24 17:43:38.566
  STEP:      Executing  Set up secret with template [testfiles/powerflex-templates/powerflex-secret-template.yaml] name [vxflexos-app-mobility-config] in namespace [test-vxflexos] for [pflex] @ 07/12/24 17:43:39.749
  STEP:      Executing  Apply custom resource [1] @ 07/12/24 17:43:40.949
  Jul 12 17:43:40.950: INFO: Running '/usr/bin/kubectl --namespace=test-vxflexos apply --validate=true -f -'
  Jul 12 17:43:41.514: INFO: stderr: ""
  Jul 12 17:43:41.515: INFO: stdout: "containerstoragemodule.storage.dell.com/vxflexos-app-mobility created\n"
  STEP:      Executing  Validate [application-mobility] module from CR [1] is installed @ 07/12/24 17:43:41.515

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods

err: failed to check for App-mob installation in default-source-cluster: expected at least 3 application-mobility/node-agent pods in namespaces [test-vxflexos] but got 0 pods
  STEP:      Executing  Validate [powerflex] driver from CR [1] is installed @ 07/12/24 17:46:21.933
  STEP:      Executing  Apply custom resource [2] @ 07/12/24 17:46:21.947
  Jul 12 17:46:21.947: INFO: Running '/usr/bin/kubectl --namespace=test-vxflexos apply --validate=true -f -'
  Jul 12 17:46:22.480: INFO: stderr: ""
  Jul 12 17:46:22.480: INFO: stdout: "containerstoragemodule.storage.dell.com/vxflexos-app-mobility configured\n"
  STEP:      Executing  Validate custom resource [2] @ 07/12/24 17:46:22.48
  STEP:      Executing  Validate [application-mobility] module from CR [2] is installed @ 07/12/24 17:46:22.491

err: failed to check for App-mob installation in default-source-cluster: pod application-mobility-velero-69d475f575-p79j4 not running:
The pod(application-mobility-velero-69d475f575-p79j4) is Pending
  STEP:      Executing  Apply custom resource [1] @ 07/12/24 17:47:02.627
  Jul 12 17:47:02.628: INFO: Running '/usr/bin/kubectl --namespace=test-vxflexos apply --validate=true -f -'
  Jul 12 17:47:04.388: INFO: stderr: ""
  Jul 12 17:47:04.388: INFO: stdout: "containerstoragemodule.storage.dell.com/vxflexos-app-mobility configured\n"
  STEP:      Executing  Validate custom resource [1] @ 07/12/24 17:47:04.388
  STEP:      Executing  Validate [application-mobility] module from CR [1] is installed @ 07/12/24 17:47:04.403

err: failed to check for App-mob installation in default-source-cluster: pod application-mobility-velero-57d4bd74df-rxc9f not running:
The pod(application-mobility-velero-57d4bd74df-rxc9f) is Pending
  STEP:      Executing  Restore template [testfiles/powerflex-templates/powerflex-secret-template.yaml] for [pflex] @ 07/12/24 17:47:44.517
  STEP:      Executing  Restore template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex] @ 07/12/24 17:47:44.547
  STEP:      Executing  Restore template [testfiles/application-mobility-templates/csm_application_mobility_with_pflex.yaml] for [application-mobility] @ 07/12/24 17:47:44.572
  STEP:      Executing  Restore template [testfiles/application-mobility-templates/csm_application_mobility_old.yaml] for [application-mobility] @ 07/12/24 17:47:44.6
  STEP:      Executing  Delete custom resource [1] @ 07/12/24 17:47:44.631
  STEP: Ending: Install Application Mobility v1.03 and upgrade to v1.1.0
   @ 07/12/24 17:47:44.677
• [251.403 seconds]
------------------------------

Ran 1 of 1 Specs in 251.418 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 4m24.238919689s
Test Suite Passed
./run-e2e-test.sh: line 257: runTests: command not found

@JacobGros JacobGros merged this pull request into velero-upgrade Jul 12, 2024
8 of 9 checks passed
falfaroc pushed a commit that referenced this pull request Jul 15, 2024
* add e2e test for defect fix

* fix upgrade

* fix upgrade

* add downgrade test

* fix title
suryagupta4 added a commit that referenced this pull request Jul 16, 2024
* velero upgrade

* update new velero crds

* velero-plugin-for-aws version upgrade

* Update node agent and velero crds for v1.14.0

* Remove node agent when performing AM upgrade  (#627)

* try removing older node agent

* add namespace substitute to old path

* fix replace

* move check to AM

* add var to modules

* fix small error

* fix check

* add debug logging

* try status fix

* return fmt error

* return fmt error

* remove debugging lohs

* fix lint

* fix lint

* gofumpt

* prevent short circuit

* add UT for AppMobilityVelero

* Fix sanity e2e tests

* Revert auth storage templates

* Revert auth storage templates

* Fix incorrect replace name for auth

* Add e2e test (#629)

* add e2e test for defect fix

* fix upgrade

* fix upgrade

* add downgrade test

* fix title

* Migrate application mobility upgrade to scenarios file

* Change config version

* Fix application mobility e2e tests

---------

Co-authored-by: Fernando Alfaro Campos <Fernando.Alfaro_campos@Dell.com>
Co-authored-by: JacobGros <jacobgrosner4@gmail.com>
Co-authored-by: abhi16394 <abhi.muralidhara@dell.com>
shaynafinocchiaro pushed a commit that referenced this pull request Jul 18, 2024
* add e2e test for defect fix

* fix upgrade

* fix upgrade

* add downgrade test

* fix title
shaynafinocchiaro added a commit that referenced this pull request Jul 18, 2024
* fix lint

* fix lint

* prevent short circuit

* Fix sanity e2e tests

* Revert auth storage templates

* Revert auth storage templates

* Add e2e test (#629)

* add e2e test for defect fix

* fix upgrade

* fix upgrade

* add downgrade test

* fix title

* Migrate application mobility upgrade to scenarios file

* Cages to correct broken authorization e2e for operator

* add script changes

* auth e2e changes for v1 and v2

* use conditional instead of new steps

* v1 changes

* minor changes

* add uprade path

* remove unnecessary steps

* remove steps

* add support for multiple drivers in a single scenario

* Changing logs

* add more changes for V2 and multiple drivers

* add new step for deleting CRs and combine resources into one file

* remove duplicate step

* support both drivers on creation and delete for CRs

* fix tenant name for token

* update scenarios

* Adding Powerscale port

* only support powerflex for V2

* update readme

* move scenario

* update note

---------

Co-authored-by: JacobGros <jacobgrosner4@gmail.com>
Co-authored-by: Fernando Alfaro Campos <Fernando.Alfaro_campos@Dell.com>
Co-authored-by: Alik Saring <alik.saring@dell.com>
Co-authored-by: Harshita Pandey <Harshita_Pandey@dell.com>
ChristianAtDell added a commit that referenced this pull request Oct 15, 2024
* velero upgrade

* update new velero crds

* velero-plugin-for-aws version upgrade

* Update node agent and velero crds for v1.14.0

* Remove node agent when performing AM upgrade  (#627)

* try removing older node agent

* add namespace substitute to old path

* fix replace

* move check to AM

* add var to modules

* fix small error

* fix check

* add debug logging

* try status fix

* return fmt error

* return fmt error

* remove debugging lohs

* fix lint

* fix lint

* gofumpt

* prevent short circuit

* add UT for AppMobilityVelero

* Fix sanity e2e tests

* Revert auth storage templates

* Revert auth storage templates

* Fix incorrect replace name for auth

* Add e2e test (#629)

* add e2e test for defect fix

* fix upgrade

* fix upgrade

* add downgrade test

* fix title

* Migrate application mobility upgrade to scenarios file

* Change config version

* Fix application mobility e2e tests

---------

Co-authored-by: Fernando Alfaro Campos <Fernando.Alfaro_campos@Dell.com>
Co-authored-by: JacobGros <jacobgrosner4@gmail.com>
Co-authored-by: abhi16394 <abhi.muralidhara@dell.com>
ChristianAtDell added a commit that referenced this pull request Oct 15, 2024
* fix lint

* fix lint

* prevent short circuit

* Fix sanity e2e tests

* Revert auth storage templates

* Revert auth storage templates

* Add e2e test (#629)

* add e2e test for defect fix

* fix upgrade

* fix upgrade

* add downgrade test

* fix title

* Migrate application mobility upgrade to scenarios file

* Cages to correct broken authorization e2e for operator

* add script changes

* auth e2e changes for v1 and v2

* use conditional instead of new steps

* v1 changes

* minor changes

* add uprade path

* remove unnecessary steps

* remove steps

* add support for multiple drivers in a single scenario

* Changing logs

* add more changes for V2 and multiple drivers

* add new step for deleting CRs and combine resources into one file

* remove duplicate step

* support both drivers on creation and delete for CRs

* fix tenant name for token

* update scenarios

* Adding Powerscale port

* only support powerflex for V2

* update readme

* move scenario

* update note

---------

Co-authored-by: JacobGros <jacobgrosner4@gmail.com>
Co-authored-by: Fernando Alfaro Campos <Fernando.Alfaro_campos@Dell.com>
Co-authored-by: Alik Saring <alik.saring@dell.com>
Co-authored-by: Harshita Pandey <Harshita_Pandey@dell.com>
@mjsdell mjsdell deleted the add-e2e-test branch October 17, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant