-
Notifications
You must be signed in to change notification settings - Fork 66
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
Run e2e tests locally without spinning smtp servers #4147
base: main
Are you sure you want to change the base?
Conversation
…smtp server processes
the only downside to this approach is that e2e tests that require the smtp server will always fail locally when running the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4147 +/- ##
=======================================
Coverage 78.65% 78.65%
=======================================
Files 286 286
Lines 13087 13087
Branches 2922 2922
=======================================
Hits 10293 10293
Misses 2794 2794
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Could the same env var not be used to |
package.json
Outdated
@@ -37,6 +37,7 @@ | |||
"test:docs": "node test/e2e/docs/valid-links.js ./docs", | |||
"test:system": "mocha 'test/system/**/*_spec.js' --timeout 10000 --node-option=unhandled-rejections=strict", | |||
"cy:web-server": "npm-run-all --parallel cy:web-server:os cy:web-server:ee", | |||
"cy:web-server-light": "cross-env NO_SMTP_SERVER=true npm-run-all --parallel cy:web-server:os cy:web-server:ee", |
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.
Instead of yet another script, can we not simply do the inverse?
i.e.
- local tests always runas they always used to (no SMTP docker image)
- tests on CI self determine the environment and run the SMTP docker image
- If local wants to run smtp tests then local sets an ENV VAR e.g.
SMTP_TESTS=true
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.
Can't think of a solution where we'd get away with not duplicating an existing script, but I'm open to suggestions.
We'd need to be able to run the e2e tests locally with and without the smtp server (this applies to all three scenarios running os, running ee and running them together) while CI needs relies on a smtp service (so no smtp server required via docker)
the only downside to this approach is that e2e tests that require the smtp server will always fail locally when running the
cy:web-server-light
scriptCould the same env var not be used to
.skip
the failing tests?
This would be a good approach but would come with some caveats.
Running the e2e tests locally without the smtp server and associated tests would result in an incomplete run and would render incomplete result. That's why I think there should be another script or method that would run the entire suite with the smtp server enabled locally.
Description
add the ability to run e2e tests locally without spinning the docker smtp server processes
Related Issue(s)
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label