trussed-dev / fido2-tests

Test suite for FIDO2, U2F, and other security key functions
Other
48 stars 38 forks source link

Use hardware capabilities in tests #21

Open prusnak opened 5 years ago

prusnak commented 5 years ago

Let's replace code like this:

https://github.com/solokeys/fido2-tests/blob/2cc35f10cf4c1aa5be103d27d88397176a483ba9/tests/standard/fido2/test_resident_key.py#L180-L181

with something saner such as

@pytest.mark.skip_has_display
@pytest.mark.skip_truncates_displayName

This would also require defining a capability list for each supported hardware such as

capabilities = {
    'trezor': ['has_display'],
    'solokeys': ['truncates_displayName'],
}
nickray commented 5 years ago

This is a much better approach indeed! Ideally, we'd include capability lists for collaborating projects (or even hrmmm... wellknown others), while external users could somehow specify theirs when invoking the tests.