Skip to content
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

Add an option for creating fake users to api #170

Merged
merged 1 commit into from May 19, 2017

Conversation

paramsingh
Copy link
Collaborator

Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mayhem mayhem merged commit 1861e9f into metabrainz:influx-test-scribbles May 19, 2017
@paramsingh paramsingh deleted the influx-stress branch May 22, 2017 13:22
@@ -140,7 +142,10 @@ def _validate_auth_header():

user = db.user.get_by_token(auth_token)
if user is None:
user = db.user.create_user_with_token(auth_token)
if CREATE_FAKE_USERS_FOR_STRESS_TESTING:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this has been merged, but is there a way that this can be integrated without having a create operation in a verify method?
Is it possible to make the stress-test tool send 2 requests (1 POST to create an account [under a similar guard as this one], and then the POST to save data)?
Is this setting used when DEBUG is set to False? If no, we could have a guard to make sure that CREATE_FAKE_USERS_FOR_STRESS_TESTING && !DEBUG is never true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see your point. This is going to be used very rarely, in fact I plan to use it only one more time before our beta. Then this code can go away... But I think adding the guard is a pretty good idea.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you pinky swear that we're going to delete this code very soon, I'll let it slide, but a DEBUG guard would make me much less anxious

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://tickets.metabrainz.org/browse/LB-161 -- I don't do NDAs or pinky swears. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants