-
Notifications
You must be signed in to change notification settings - Fork 1
SS-1219 Django views to manage e2e_test data #320
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
SS-1219 Django views to manage e2e_test data #320
Conversation
cypress.config.js
Outdated
| wait_db_reset: 60000, | ||
| create_resources: true, | ||
| run_extended_k8s_checks: false, | ||
| populate_test_data_management_views_secret: process.env.POPULATE_TEST_DATA_MANAGEMENT_VIEWS_SECRET, |
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.
It only works if I hard-code this variable here
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 re-wrote it with 'dotenv'
|
In general I think an endpoint to seed data in the database is something useful. This endpoint would be hidden and used against the dev database when it is wiped out (or can be used locally). I imagined test suites running somewhat isolated when it comes to fixtures/data eg. Pytest and Cypress running with their respective data. From what I understand it here in this PR, we are allowing local Cypress tests to run against the dev database on the dev cluster remotely. I can't think of a use-case for such flexibility. Usually I run Cypress locally as well as manually on my branch on GitHub. This is just a thought but maybe I'm missing another use-case for this feature here. |
There are a few use cases that I can remember that made us consider creating this task:
I might be wrong here, but I believe that's where this idea comes from. |
|
Thanks Jana and Nikita. For now I am keeping it in this way. This is configurable in cpypress.config.js, so we can disable it if we want in the future anytime. |
|
Fair enough. |
Do you mean using this branch or ever before?:) I believe we tried doing it before. |
This branch. I think @anondo1969 is in the process of trying to run the E2E tests locally against the dev instance but is facing some IP/permissions issues. |
I am not sure if it is due to running the scripts. I can access it via browser though. |
I checked and now I don't have this error anymore. |
j-awada
left a comment
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
Source: https://scilifelab.atlassian.net/browse/SS-1219 Creating Django views to manage e2e_test data. Data can be managed (creation and deletion of users, projects, and apps) via Django view endpoints. Integrated with Cypress e2e tests. The Cypress test configuration is customizable, making it easy to revert to the previous script-based seeding method if needed. Two levels of security are ensured: (a) Accessible only when DEBUG mode is True (b) CSRF token required Unit test cases have also been written.
Status
Ready for review.
Description
Source: https://scilifelab.atlassian.net/browse/SS-1219
Creating Django views to manage e2e_test data.
Data can be managed (creation and deletion of users, projects, and apps) via Django view endpoints.
Integrated with Cypress e2e tests.
The Cypress test configuration is customizable, making it easy to revert to the previous script-based seeding method if needed.
Two levels of security are ensured:
DEBUGmode isTrueUnit test cases have also been written.
Types of changes
new feature
Checklist
If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.
Further comments