-
Notifications
You must be signed in to change notification settings - Fork 6
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 test to validate potential problem when requesting many vault files uploads #438
Conversation
""" | ||
test_data = json.dumps({"data": "test"}, ensure_ascii=False).encode("UTF-8") | ||
headers = {"Accept": ContentType.APP_JSON} # multi-part content-type added automatically with boundary | ||
for i in range(30): |
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.
Est-ce que qu'on veut définir une variable Nombre_de_requête ?
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.
On pourrait, mais je ne vois pas le besoin pour un test automatisé comme celui-ci.
# make sure access was not by chance | ||
resp = self.app.get(url=f"/vault/{file_id}", expect_errors=True) | ||
assert resp.status_code == 403 | ||
resp = self.app.get(url=f"/vault/{file_id}", headers={"X-Auth-Vault": token}) |
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.
Bien que ma machine était fautive, est-ce qu'on veut mettre un temps d'attente entre les deux requêtes ?
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.
Je pense que ce test (s'il y a problème) devrait lever le plus d'erreurs possible parce que ça s'exécute aussi vite que possible.
Je ne pense pas que l'ajout d'un délai vas changer le résultat.
LGTM, à moins qu'on veuille avoir des tests plus larges, celui si est simple et test le vault convenablement selon moi. |
No description provided.