Macro generate_tests

Source
macro_rules! generate_tests {
    ($preinit: expr, $serialize_tests: expr,
     $backend: ty, $init_backend: expr,
     $import_cert: expr, $can_import_encrypted_secret_key_material: expr,
     $key_sets: expr, $default_password: expr,
     $can_export: expr,
     $can_change_password: expr,
     $can_delete: expr) => { ... };
}
Expand description

Preinit is a function that is called at the start of every test. If it returns true, the test should be run. If it returns false, then the test should be skipped. This is useful when the required test infrastructure is not detected.

$serialize_tests is whether to serialize the tests for this backend. If false, the tests are run concurrently.

$import_cert imports a certificate into the backend.

$can_import_encrypted_secret_key_material is whether $import_cert can import encrypted secret key material.

If $key_sets is Some, then the backend can only load standard keys consisting of (up to) an encrypt key, a signing key and an authentication key. The integer indicates the number of key sets that the backend can load simultaneously. If $key_sets is None, then the backend can load an infinite number of keys.

Some backends always protect keys by default. If $default_password is Some that’s the password for keys when they are imported.