-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Have tests generate a certificate on-the-fly #4651
Comments
We could use this so we can generate without any prompt, where do you think we could put this? I would like to add this functionality. |
I wonder if we could implement it as a pytest fixture. Otherwise, having pytest create the file (overwriting) at the beginning of a test session should do the job; it may be even better, as it’s probably much simpler. |
I have a small concern that in some environments there will be not enough entropy for doing this quickly, but we'll need to actually check this. |
I think i know what you mean, doing a little more research i found this answer: https://stackoverflow.com/a/60804101/9291099, generating programmatically is more safe than using a command, right? Can you take a look @Gallaecio |
I don’t think that kind of safety matters here, given the purpose of the certificate. I wouldn’t put too much effort in creating it using a Python library if it can be done easily with a command. Mind, however, that the command would probably have to be executed from some Python code using POpen (I would check pytest documentation for possible places where to put such a call). |
Unless we want to be doing #4650 every year, we should look into making tests generate a fresh certificate at run time.
The text was updated successfully, but these errors were encountered: