-
Notifications
You must be signed in to change notification settings - Fork 46
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
tests: Use a random test user when no env vars are present #584
base: master
Are you sure you want to change the base?
Conversation
Change-type: minor Signed-off-by: Thodoris Greasidis <[email protected]>
Change-type: patch Signed-off-by: Thodoris Greasidis <[email protected]>
Change-type: patch Signed-off-by: Thodoris Greasidis <[email protected]>
Resolves: #582 Change-type: patch See: product-os/balena-concourse#248 See: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-on-alpine Signed-off-by: Thodoris Greasidis <[email protected]>
@thgreasi We should make it clear that the tests are auto-generating a user, and what the user's email is. Do we know if these test users can be blacklisted from our analytics? |
I will add an extra note in the
Yea, everything |
@thgreasi The test runner should log to stdout that its using an autogenerated user, otherwise a misconfiguration could go unnoticed quite easily. |
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'm happy to merge this. I think we're holding it for now just because of the reliability implications, right? Once that's resolved somehow, this looks good to me.
@pimterry yea, that's my concern atm. |
@thgreasi What is the status of this PR? are we still concerned about reliability? |
|
||
While developing you might end up in a situation that the API returns rate limiting errors. | ||
That's probably caused by the new user signups that each run of the test suit does. | ||
You can avoid those errors to some extend by specifying a pre-existing **empty** user account to run the suit against. |
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.
NIT:
suit
->suite
extend
->extent
.tap -> shouldDeleteTestUser = true | ||
.return(credentials) | ||
.tapCatch -> | ||
console.error('Failed to autogenerate test credentials!') |
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.
Perhaps this should just throw an error here?
@dimitrisnl Whats the status of this PR? reviewing the comments it looks like it was nearly ready to go in November |
Thanks for the review @LucianBuzzo 👍 |
@balena-ci retest |
It seems that this is blocked again, since we have decreased the allowed rate of signups. |
RESINTEST_USERNAME/...
env vars if present, since while developing this I ended up having the staging api rate limit me b/c of the extra user registrations that the suit did. As a result, for practical reasons, I think we should still keep them to not add friction when developing. This enables us toRESINTEST_REGISTER_*
env vars and generated a random user as well.Resolves: #582
Change-type: minor
See: https://www.flowdock.com/app/rulemotion/resin-frontend/threads/JIU7143SphYOgcVeQVh5n69eycK
See: resin-io/resin-concourse#248
See: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-on-alpine
Signed-off-by: Thodoris Greasidis [email protected]