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

🛑 DO NOT MERGE test: update e2e tests with afterEach cleanup #2677

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hashicc
Copy link
Collaborator

@hashicc hashicc commented Feb 3, 2025

🛑 DO NOT MERGE until 0.19 has been fully released

Description

Prefer afterEach for vault resource cleanup. This leaves the state clean and ready for the next test or test suite. If this wasn't done, the next following test or test suite would also rely on beforeEach tests for clean up before running.

How to Test

Setup scenarios for ce/ent by docker/aws by admin/desktop and run the corresponding tests changed in this PR:

  • e2e-tests/admin/tests/credential-store-vault-ent.spec.js
  • e2e-tests/admin/tests/credential-store-vault.spec.js
  • e2e-tests/admin/tests/delete-resources-ent.spec.js
  • e2e-tests/admin/tests/delete-resources.spec.js
  • e2e-tests/admin/tests/ssh-certificate-injection-vault-ent.spec.js
  • e2e-tests/admin/tests/ssh-credential-injection-vault-ent.spec.js
  • e2e-tests/desktop/tests/credentials.spec.js

e2e-tests/admin/tests/credential-store-vault.spec.js

Running 3 tests using 1 worker

  ✓  1 [chromium] › tests/credential-store-vault.spec.js:40:1 › Vault Credential Store (User & Key Pair) @ce @aws @docker (11.1s)

  ✓  2 [firefox] › tests/credential-store-vault.spec.js:40:1 › Vault Credential Store (User & Key Pair) @ce @aws @docker (13.0s)

  ✓  3 [webkit] › tests/credential-store-vault.spec.js:40:1 › Vault Credential Store (User & Key Pair) @ce @aws @docker (12.0s)

  3 passed (38.9s)

e2e-tests/admin/tests/delete-resources.spec.js

Running 3 tests using 1 worker

  ✓  1 [chromium] › tests/delete-resources.spec.js:44:1 › Verify resources can be deleted @ce @aws (51.0s)

  ✓  2 [firefox] › tests/delete-resources.spec.js:44:1 › Verify resources can be deleted @ce @aws (49.2s)

  ✓  3 [webkit] › tests/delete-resources.spec.js:44:1 › Verify resources can be deleted @ce @aws (50.0s)

  Slow test file: [chromium] › tests/delete-resources.spec.js (51.0s)
  Slow test file: [webkit] › tests/delete-resources.spec.js (50.0s)
  Slow test file: [firefox] › tests/delete-resources.spec.js (49.2s)
  Consider splitting slow test files to speed up parallel execution
  3 passed (2.6m)

e2e-tests/admin/tests/credential-store-vault-ent.spec.js

Running 3 tests using 1 worker

  ✓  1 [chromium] › tests/credential-store-vault-ent.spec.js:37:1 › Vault Credential Store (User & Key Pair) @ent @aws @docker (13.0s)

  ✓  2 [firefox] › tests/credential-store-vault-ent.spec.js:37:1 › Vault Credential Store (User & Key Pair) @ent @aws @docker (14.1s)

  ✓  3 [webkit] › tests/credential-store-vault-ent.spec.js:37:1 › Vault Credential Store (User & Key Pair) @ent @aws @docker (13.6s)

  3 passed (43.8s)

e2e-tests/admin/tests/ssh-certificate-injection-vault-ent.spec.js

Running 3 tests using 1 worker

  ✓  1 [chromium] › tests/ssh-certificate-injection-vault-ent.spec.js:35:1 › SSH Certificate Injection @ent @docker (12.7s)

  ✓  2 [firefox] › tests/ssh-certificate-injection-vault-ent.spec.js:35:1 › SSH Certificate Injection @ent @docker (14.0s)

  ✓  3 [webkit] › tests/ssh-certificate-injection-vault-ent.spec.js:35:1 › SSH Certificate Injection @ent @docker (12.3s)

  3 passed (42.0s)

e2e-tests/admin/tests/ssh-credential-injection-vault-ent.spec.js

Running 3 tests using 1 worker

  ✓  1 [chromium] › tests/ssh-credential-injection-vault-ent.spec.js:37:1 › SSH Credential Injection (Vault User & Key Pair) @ent @docker (12.7s)

  ✓  2 [firefox] › tests/ssh-credential-injection-vault-ent.spec.js:37:1 › SSH Credential Injection (Vault User & Key Pair) @ent @docker (14.3s)

  ✓  3 [webkit] › tests/ssh-credential-injection-vault-ent.spec.js:37:1 › SSH Credential Injection (Vault User & Key Pair) @ent @docker (13.5s)

  3 passed (43.4s)

e2e-tests/desktop/tests/credentials.spec.js

Running 2 tests using 1 worker

  ✓  1 tests/credentials.spec.js:207:3 › Credential Panel tests › Display Vault brokered Credentials and handle special characters (5.0s)

  ✓  2 tests/credentials.spec.js:265:3 › Credential Panel tests › Display JSON static credential in a key value format and handle special characters (5.2s)

  2 passed (11.6s)

e2e-tests/admin/tests/delete-resources-ent.spec.js

Running 3 tests using 1 worker

  ✓  1 [chromium] › tests/delete-resources-ent.spec.js:44:1 › Verify resources can be deleted (enterprise) @ent @aws (54.8s)

  ✓  2 [firefox] › tests/delete-resources-ent.spec.js:44:1 › Verify resources can be deleted (enterprise) @ent @aws (52.0s)

  ✓  3 [webkit] › tests/delete-resources-ent.spec.js:44:1 › Verify resources can be deleted (enterprise) @ent @aws (56.5s)

  Slow test file: [webkit] › tests/delete-resources-ent.spec.js (56.5s)
  Slow test file: [chromium] › tests/delete-resources-ent.spec.js (54.8s)
  Slow test file: [firefox] › tests/delete-resources-ent.spec.js (52.0s)
  Consider splitting slow test files to speed up parallel execution
  3 passed (2.8m)

Checklist

- [ ] I have added before and after screenshots for UI changes
- [ ] I have added JSON response output for API changes

  • I have added steps to reproduce and test for bug fixes in the description
    - [ ] I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boundary-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 7:49pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 7:49pm

@hashicc hashicc changed the title 🛑 DO NOT MERGE test: 💍 update e2e tests with afterEach cleanup 🛑 DO NOT MERGE test: 💍 update e2e tests with afterEach cleanup Feb 3, 2025
@hashicc hashicc changed the title 🛑 DO NOT MERGE test: 💍 update e2e tests with afterEach cleanup 🛑 DO NOT MERGE test: update e2e tests with afterEach cleanup Feb 4, 2025
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