diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-01-02 15:08:55 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-01-02 15:26:08 +0000 |
commit | 68bfcaad34f19faa4c9b78edd17f2e5aff23715a (patch) | |
tree | 8fc0c1e88c8a4b2b2b8714e937db0eb7339aebee /testing | |
parent | cd1eb0e88c95c61ed6787a5a536d78b1b961bdba (diff) | |
download | gitano-68bfcaad34f19faa4c9b78edd17f2e5aff23715a.tar.gz |
Split up the destroy yarn a bit
Diffstat (limited to 'testing')
-rw-r--r-- | testing/02-commands-destroy.yarn | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/testing/02-commands-destroy.yarn b/testing/02-commands-destroy.yarn index e545fcd..24fc257 100644 --- a/testing/02-commands-destroy.yarn +++ b/testing/02-commands-destroy.yarn @@ -1,6 +1,17 @@ <!-- -*- markdown -*- --> - SCENARIO repository destruction +Destroying repositories +======================= + +Git, and Gitano for that matter, works hard to preserve information. However +sometimes you need to destroy a repository. Perhaps it has been moved to +another server, or you never wanted the repository in the first place. Gitano +has a pair of commands for this, the first is the 'destroy' command. + +Failure pathways +---------------- + + SCENARIO repository destruction failure modes GIVEN a standard instance AND testinstance using adminkey has patched gitano-admin with personal-repo-create.patch @@ -21,6 +32,20 @@ then we must tell them it failed because they weren't permitted. THEN stderr does not contain ERROR: Cannot destroy a repository which does not exist AND stderr contains CRIT: You may not destroy repositories you do not own + FINALLY the instance is torn down + +Destroying repositories successfully +------------------------------------ + +Repositories can, clearly, be destroyed however if the calling user has write +access to them. Since in the default ruleset the owner of a repository has +write access, owners can remove their own repositories. + + SCENARIO repository destruction + GIVEN a standard instance + AND testinstance using adminkey has patched gitano-admin with personal-repo-create.patch + AND testinstance, using adminkey, adds a new user alice, with a key called main + Repositories writable by the user can be destroyed by the user. WHEN alice main runs create personal/alice/testrepo @@ -42,6 +67,9 @@ which will do the delete if the token is still valid when passed to destroy. WHEN alice main runs destroy personal/alice/testrepo THEN stdout contains re-run your command with the following confirmation token +Any changes which have been made to a repository will affect the token and so +if metadata or any content refs are updated, the token will no longer match... + GIVEN the token is saved as delete WHEN testinstance adminkey runs config personal/alice/testrepo set project.description Foo AND alice using main, expecting failure, destroys personal/alice/testrepo using the delete token |