Nitrokey / nitrokey-3-tests

Automated tests for the Nitrokey 3
3 stars 0 forks source link

add extra secret tests from pynitrokey #45

Closed blu-nitro closed 4 months ago

blu-nitro commented 4 months ago

Adds secrets tests from pynitrokey. This is an effort to unify the test suites in order to make things easier for projects like hil.

Changes:

This should not change anything to current test execution via pytest, only that going forward tests that are supposed to be run by default will have to be placed in tests/default/ instead of tests/.

It does however seem to generate a bunch of warnings, which i'm not sure whether they come from pynitrokey or from anything new.

robin-nitrokey commented 4 months ago

Makes sense. Why the distinction between default and extra tests? Couldn’t we just put the new tests into test/secrets.py?

blu-nitro commented 4 months ago

If we were to just put the new tests into test/secrets.py, then with the current way we select tests with patterns, like test_list or test_lsusb, this would for example select test_list_with_properties as well from the new secrets tests. So we could rename some of them, but i didn't want to touch the tests themselves, as that was out scope for what i wanted to do with this PR. But if you want, we could of course find another way of getting this to work with all tests in the same directory.

robin-nitrokey commented 4 months ago

I see. We could introduce an extra marker and apply it to all tests in the module to be able to filter them.

robin-nitrokey commented 3 months ago

@blu-nitro This means we can now delete test_secrets_app.py from pynitrokey, right?

blu-nitro commented 3 months ago

@blu-nitro This means we can now delete test_secrets_app.py from pynitrokey, right?

It is not needed in nitrokey-hardware-test anymore. I'm not sure if it was used anywhere else though.