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

test: [M3-8114] - Clean up Linodes, LKE clusters, and Firewalls after Cypress runs #11189

Merged

Conversation

jdamore-linode
Copy link
Contributor

Description 📝

This adds some post-run resource clean up to our Cypress tests in order to reduce any security risks that come from having Linodes sitting around unattended.

Unfortunately, because of the way that Cypress works and the way our test utils are organized, we can't reuse our existing clean up functions and have to reimplement them (which more or less amounted to a copy/paste). I included some comments about that in the code, and hope to address it long term as part of M3-8803.

Changes 🔄

  • Deletes Linodes, LKE Clusters, and Firewalls after Cypress run

Target release date 🗓️

N/A

Preview 📷

Screenshot 2024-10-30 at 1 31 55 PM

How to test 🧪

  1. Create some Linodes, Firewalls, and optionally LKE clusters with labels that start with cy-test-
  • ℹ️ Note: only LKE clusters that have finished provisioning will be deleted by run clean up, so keep that in mind if you create LKE clusters for the purpose of testing this ticket
  1. Run some Cypress test(s) via yarn cy:run, example yarn cy:run -s "cypress/e2e/core/billing/*"
  2. Observe in your console that post-run clean up occurs ("Performing post-run clean up:" note immediately before spec test results are shown)
  3. Observe in Cloud Manager that the test resources you created in step 1 have been deleted

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@jdamore-linode jdamore-linode self-assigned this Oct 30, 2024
@jdamore-linode jdamore-linode requested review from a team as code owners October 30, 2024 17:38
@jdamore-linode jdamore-linode requested review from AzureLatte, cpathipa and coliu-akamai and removed request for a team October 30, 2024 17:38
Copy link

github-actions bot commented Oct 30, 2024

Coverage Report:
Base Coverage: 87.35%
Current Coverage: 87.35%

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ confirmed deletion of linodes, firewalls, and (provisioned) lke clusters after running cypress tests

Thanks Joe!

@jdamore-linode jdamore-linode added the Add'tl Approval Needed Waiting on another approval! label Nov 1, 2024
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 445 passing tests on test run #4 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing445 Passing2 Skipped89m 42s

@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Nov 4, 2024
@jdamore-linode jdamore-linode merged commit 7c547f6 into linode:develop Nov 4, 2024
23 checks passed
Copy link

cypress bot commented Nov 4, 2024

Cloud Manager E2E    Run #6779

Run Properties:  status check passed Passed #6779  •  git commit 7c547f63ed: test: [M3-8114] - Clean up Linodes, LKE clusters, and Firewalls after Cypress ru...
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #6779
Run duration 26m 20s
Commit git commit 7c547f63ed: test: [M3-8114] - Clean up Linodes, LKE clusters, and Firewalls after Cypress ru...
Committer jdamore-linode
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 445
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants