-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cypress e2e initial infra #2548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looking through this, but had a few questions so far
I attempted to run the three specs, after selecting the Google browser. Looks to be a fundamental issue, any help would be appreciaed.
|
@sagerb The error points to the command used to bootstrap an admin user API key, that is done through Thanks for trying it out! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to run just/e2e/dev
and got the Cypress UI.
I first ran into an error where I didn't have rsconnect
so I created a Python venv
and installed rsconnect-python
which got me past that.
Next I ran into an error in the Credentials test:
The text didn't match because of a URL validation error.
The deployments spec also did not pass for me because of Cypress env BOOTSTRAP_ADMIN_API_KEY is empty. Cannot set admin credentials.
Is there additional setup I'm missing?
It could be that not having Could you try the following?:
Also, it could be that the Connect instance of the e2e tests is not running. You may have to double check that there is no other Connect instance running with the same ports that the e2e Connect container wants to pick up. |
I didn't run No difference - I'm still seeing both of the errors above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validated functionality, and it works! Woo hoo!!!! This is a great start for this functionality. Thanks for working through this.
I recorded some notes through the process:
- why is it only using connect version rstudio-connect_2024.12.0?
- I had a conflict with my dev connect server already running, perhaps you should use a different port when you launch the connect server used for the tests?
- Is there a faster way than starting the just test/e2e/dev all over again, when you have an error? I’ve already built the publisher and seems like I don’t need to do it again.
For posterity... I had some environmental issues locally which I had to resolve. I hit the error once again that I had reported earlier. I narrowed it down to an issue within my environment by being unable to run rsconnect version
without a stack trace being displayed.
With this, I concluded that my rsconnect-python
installation was invalid. To resolve, I:
- created a virtual environment for a newer version of python, from within VSCode using the command: Python: Select Interpreter
and then choosing to create a virtual environment using .venv
for a newer version of python.
- I then restarted a terminal from within VSCode, which activated that virtual python environment. I verified this with the command python --version
.
- I then uninstalled the previous version of rsconnect-python
with pip uninstall rsconnect-python
.
- I then installed a fresh copy with pip install rsconnect-python
and verified its functionality with the command rsconnect version
- I then retested, using the command just test/e2e/dev
Great Job Marcos!
Thanks @sagerb, definitely great feedback to make this better in future PRs 🙇 |
Intent
Fixes #2508
PR to have the initial building steps of infra for e2e tests, aiming for consistent reproducibility.
Only includes three tests so far to serve as examples and starting point for more to come:
To try this, just pull the branch and
just test/e2e/dev
, this command will do the necessary setup and open Cypress.... and
just test/e2e/stop
to tear down the containers.Type of Change
Approach
code-server
instances.User Impact
There is not a direct impact for the end user.
Automated Tests
Yes
Directions for Reviewers
Try it out with
just test/e2e/dev
, andjust test/e2e/stop
to teardown the containers.Checklist