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

Icu 14777 add more target tests #2594

Merged
merged 6 commits into from
Dec 3, 2024
Merged

Conversation

ZedLi
Copy link
Collaborator

@ZedLi ZedLi commented Nov 26, 2024

Description

Added some more target tests that utilize enos for e2e. I decided to setup much of the boundary bits needed for testing using HTTP requests. Open to discussion about this.

There's realistically 3 ways to interact with boundary for a lot of our test setups:

  1. Using the boundary CLI.
  2. Make HTTP requests to the boundary controller
  3. Use admin UI

I tried the boundary CLI first but I didn't see much of a benefit using it over HTTP besides @moduli having already built out most of the commands. It also introduces more overhead having to spin up shells to execute the commands.

I tried using admin UI to setup tests which also has the huge benefit of having @moduli already built most of what we need and it worked well except for a few quirks:

  1. I had to reach in the admin side of e2e tests to access the pages which I wasn't a fan of, it didn't feel quite right to pull those out to the root either.
  2. Some of the pages did make a few assumptions of how they were used so I had to modify them which also requires me to verify the admin UI tests weren't affected. I'm not a fan of having these pages now affecting both sets of tests.
  3. The biggest con is it's slow and using an actual browser to set things up takes forever.

I decided mainly to keep things separate between admin and desktop as well as to keep test setups much faster and to just build out the boundary HTTP client requests. It setups up quite fast and and is still straight forward to interact with.

I also updated the README into a shared one at the root.

How to Test

Run through the admin README to setup enos using enterprise boundary. At the e2e root folder, run yarn desktop.

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

@ZedLi ZedLi requested a review from moduli November 26, 2024 00:32
@ZedLi ZedLi self-assigned this Nov 26, 2024
@ZedLi ZedLi requested a review from a team as a code owner November 26, 2024 00:32
Copy link

vercel bot commented Nov 26, 2024

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 Dec 3, 2024 11:34pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 11:34pm

Copy link
Collaborator

@moduli moduli left a comment

Choose a reason for hiding this comment

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

I figured the http methods would be the way to go for desktop tests.

Ran the tests locally. Pretty niceeeeeee.

e2e-tests/desktop/tests/targets.spec.js Show resolved Hide resolved
e2e-tests/desktop/tests/targets.spec.js Show resolved Hide resolved
e2e-tests/desktop/tests/targets.spec.js Show resolved Hide resolved
e2e-tests/desktop/tests/targets.spec.js Show resolved Hide resolved
moduli
moduli previously approved these changes Nov 26, 2024
@DhariniJeeva
Copy link
Collaborator

curious to know if you considered sharing playwright.config between Admin and Desktop? It seems like most things are common.

@ZedLi
Copy link
Collaborator Author

ZedLi commented Nov 26, 2024

curious to know if you considered sharing playwright.config between Admin and Desktop? It seems like most things are common.

I have, right now our configs diverge enough where I didn't want to share it

calcaide
calcaide previously approved these changes Nov 27, 2024
Copy link
Collaborator

@calcaide calcaide left a comment

Choose a reason for hiding this comment

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

Awesome work!! very excited for this, the move makes e2e test being first class citizen!! Thank you

Left some none blocking comments 😉

@calcaide
Copy link
Collaborator

After running the tests I got 3 of them failing, is this expected?

Screenshot 2024-11-27 at 12 00 55 PM

@calcaide
Copy link
Collaborator

More info about one of the test failures mentioned above:
Screenshot 2024-11-27 at 12 01 58 PM
Screenshot 2024-11-27 at 12 02 07 PM
Screenshot 2024-11-27 at 12 02 17 PM

@ZedLi
Copy link
Collaborator Author

ZedLi commented Nov 27, 2024

After running the tests I got 3 of them failing, is this expected?

Ahh I made the assumption the key says BEGIN OPENSSH KEY, I can include RSA as well

Copy link
Collaborator

@DhariniJeeva DhariniJeeva left a comment

Choose a reason for hiding this comment

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

looks good!

@ZedLi ZedLi force-pushed the ICU-14777-add-more-target-tests branch from 28772a4 to 873cc9d Compare December 3, 2024 23:30
@ZedLi ZedLi merged commit 9c10d79 into main Dec 3, 2024
12 checks passed
@ZedLi ZedLi deleted the ICU-14777-add-more-target-tests branch December 3, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants