-
Notifications
You must be signed in to change notification settings - Fork 81
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 helpers for local & remote EE, changing settings #1116
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the command needs 2 settings in `cypress.env.json`: `settings`: the location of `settings.py`, relative to `test/` `restart`: a command to run to apply any settings changes invoking `cy.settings()` without params resets `settings.py` to original (actually removes lines with `#CYPRESS`), and restarts invoking `cy.settings({ FOO: true })` adds a `FOO = True #CYPRESS` to `settings.py`, and restarts
…json easier to copy/rename than create :)
ShaiahWren
approved these changes
Oct 25, 2021
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.
LGTM
This comment has been minimized.
This comment has been minimized.
This was referenced Oct 29, 2021
Backport to stable-4.4: 💚 backport PR created✅ Backport PR branch: Backported as #1146 🤖 @patchback |
patchback bot
pushed a commit
that referenced
this pull request
Oct 29, 2021
* cypress: add `cy.settings` command the command needs 2 settings in `cypress.env.json`: `settings`: the location of `settings.py`, relative to `test/` `restart`: a command to run to apply any settings changes invoking `cy.settings()` without params resets `settings.py` to original (actually removes lines with `#CYPRESS`), and restarts invoking `cy.settings({ FOO: true })` adds a `FOO = True #CYPRESS` to `settings.py`, and restarts * cypress.env.json.template: add non-gitignored version of cypress.env.json easier to copy/rename than create :) * cypress.yml: add settings, restart to cypress.env.json * add sleep to github restart command, wait for 200 from api in command * cy.settings - more wait * cy.addRemoteRegistry - move from remote registry test, needed in containers for now * cy.addRemoteContainer - use the add execution environment form, add a container * cy.addLocalContainer - use cy.exec + podman pull/push to add a local container * cy.syncRemoteContainer - use the UI to initiate a container sync (cherry picked from commit 84ef1f9)
himdel
added a commit
that referenced
this pull request
Oct 29, 2021
* cypress: add `cy.settings` command the command needs 2 settings in `cypress.env.json`: `settings`: the location of `settings.py`, relative to `test/` `restart`: a command to run to apply any settings changes invoking `cy.settings()` without params resets `settings.py` to original (actually removes lines with `#CYPRESS`), and restarts invoking `cy.settings({ FOO: true })` adds a `FOO = True #CYPRESS` to `settings.py`, and restarts * cypress.env.json.template: add non-gitignored version of cypress.env.json easier to copy/rename than create :) * cypress.yml: add settings, restart to cypress.env.json * add sleep to github restart command, wait for 200 from api in command * cy.settings - more wait * cy.addRemoteRegistry - move from remote registry test, needed in containers for now * cy.addRemoteContainer - use the add execution environment form, add a container * cy.addLocalContainer - use cy.exec + podman pull/push to add a local container * cy.syncRemoteContainer - use the UI to initiate a container sync (cherry picked from commit 84ef1f9) Co-authored-by: Martin Hradil <mhradil@redhat.com>
This was referenced Oct 29, 2021
This was referenced Nov 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-4.4
This PR should be backported to stable-4.4 (2.1)
backported-4.4
This PR has been backported to stable-4.4 (2.1)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This extracts the helper parts from #1082 & #1113 :
cy.addRemoteRegistry
- add a remote registry via the UI (from Delete registries, add registries, edit, view registries test. #1027, moving to a helper)cy.addRemoteContainer
- add a remote container via the UIcy.syncRemoteContainer
- trigger a remote container sync using the UIcy.addLocalContainer
- exec podman pull/push to add a local containercy.settings
- change server settings, restart, and wait for it to start responding❗ The
cy.settings
command needs 2 settings incypress.env.json
:settings
: the location ofsettings.py
, relative totest/
restart
: a command to run to apply any settings changesInvoking
cy.settings()
without params resetssettings.py
to original (actually removes lines containing#CYPRESS
), and restartsInvoking
cy.settings({ FOO: true })
adds aFOO = True #CYPRESS
tosettings.py
, and restartsNote: this will work for values like true, false, null, numbers, strings with no interpolation, an array of strings or numbers; but would need more work for passing arrays of objects and such, if we ever need it.
Also added a
cypress.env.json.template
- easier to copy than to createcypress.env.json
from scratch.Cc @ZitaNemeckova @ShaiahWren