-
Notifications
You must be signed in to change notification settings - Fork 88
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
Separate out tests that need network access #30
Comments
Understood, and thanks for the feedback. Keep in mind that this is a very network-centric application: it entirely depends on a proprietary web service for token provisioning to work. If that proprietary web service changes, this application will be useless for provisioning new tokens. So I do want to keep these tests in the source distribution. Perhaps it'd be helpful to add a naming convention for which tests require network access? E.g. |
How about a separate directory? so like
I don't think pytest really gives you granular control over this |
And maybe also do with pytest configuration
so when |
Done (at least for GH Actions!) as of c490e6b#diff-33c13e0b177bacd2f02e29bcb8aea5b49e7ce34901fd8f41fefb65defba1bd33 |
Is the progress of being packaged for a Linux Distro NixOS NixOS/nixpkgs#65570, we had to exclude certain tests from the testsuite because they required network access.
Tests in question were:
test_check_token_detects_valid_hotp_token
test_check_token_detects_valid_totp_token
test_check_token_detects_invalid_token
This is because packages are prohibited from being built with network access in NixOS.
You may come to find that in many other Linux distros that it's a very common practice
to want to run tests within the source distribution.
This allows us to test that a package installed successfully with our build expressions and dependencies.
Prohibition of network access on builders is also common, in particular with Fedora
which is quite keen to packaging python libraries.
The text was updated successfully, but these errors were encountered: