`keyring [list|show...] ======================= The `keyring` command allows for the (delegable) management of keyrings in the `gitano-admin.git` repository. Basic operation =============== Firstly, we ensure that with a standard instance, there are no keyrings. As a gitano-admin we have full access to the keyrings by default... SCENARIO Verify empty keyring set GIVEN a standard instance WHEN testinstance adminkey runs keyring list THEN stdout is empty AND stderr is empty FINALLY the instance is torn down Now let's check that we can create a keyring and it'll show, and vanish again when we remove it. SCENARIO Verify keyrings come and go GIVEN a standard instance WHEN testinstance adminkey runs keyring create jeff AND testinstance adminkey runs keyring list THEN stdout contains jeff AND stderr is empty WHEN testinstance adminkey runs keyring destroy jeff --force AND testinstance adminkey runs keyring list THEN stdout is empty AND stderr is empty FINALLY the instance is torn down More complex keyring operations =============================== Now let's check that we can add our test key to the keyring. Our test key has the fingerprint `32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932` and is available from our test GPG home. SCENARIO Keyrings can gain and lose keys GIVEN a standard instance WHEN testinstance adminkey runs keyring create jeff AND testinstance adminkey runs keyring list THEN stdout contains jeff AND stderr is empty GIVEN gpg key 32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932 on stdin WHEN testinstance adminkey runs keyring import jeff AND testinstance adminkey runs keyring show jeff THEN stdout contains 32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932 AND stderr is empty WHEN testinstance adminkey runs keyring delkey jeff 32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932 --force AND testinstance adminkey runs keyring show jeff THEN stdout is empty AND stderr is empty FINALLY the instance is torn down FIXME: Now that we have the ability to patch the rules we should add more tests NOTE: We should also look at hooks for validating keyrings and so on.