diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-01-02 14:59:56 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-01-02 15:25:25 +0000 |
commit | cd1eb0e88c95c61ed6787a5a536d78b1b961bdba (patch) | |
tree | f9c4afd7257aafc9ba6e1c4638257055d8d1fb78 /testing | |
parent | 735f15f855ae84b81007196c4e6943013d924e19 (diff) | |
download | gitano-cd1eb0e88c95c61ed6787a5a536d78b1b961bdba.tar.gz |
Split up the copy yarn a teeny bit
Diffstat (limited to 'testing')
-rw-r--r-- | testing/02-commands-copy.yarn | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/testing/02-commands-copy.yarn b/testing/02-commands-copy.yarn index 50a2a45..77a1d20 100644 --- a/testing/02-commands-copy.yarn +++ b/testing/02-commands-copy.yarn @@ -1,11 +1,14 @@ <!-- -*- markdown -*- --> +Copying repositories on the server-side +======================================= + You may want to copy a repository from one place on the server to another place on the same server, since access control is repository based and another user of the server may want to push their own branches. -This can be accomplished by: +This can be accomplished without server-side support by: 1. Creating the destination repository. 2. Cloning the source repository locally. @@ -15,6 +18,9 @@ This requires many round trips and sending the entire repository's contents across the internet twice, so there's use for server-side clone operation. +Copying a repository +-------------------- + SCENARIO server-side clone GIVEN a standard instance @@ -24,10 +30,18 @@ Users may copy repositories they can read to paths they can write to. THEN server-side public/testrepo has identical refs to gitano-admin AND server-side public/testrepo has no missing objects -Users may not copy repositories they can to read to paths they cannot write to. + FINALLY the instance is torn down - GIVEN testinstance, using adminkey, adds a new user alice, with a key called main +Permissions are needed +---------------------- + SCENARIO server-side clone failure modes + 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 + WHEN testinstance adminkey runs copy gitano-admin public/testrepo + +Users may not copy repositories they can to read to paths they cannot write to. In the default instance only the admin user may create repositories, so all copies by other users will fail. @@ -38,10 +52,9 @@ so all copies by other users will fail. Users may copy repositories where they may write to the destination path, but will be unable to do so if the repository already exists. - GIVEN testinstance using adminkey has patched gitano-admin with personal-repo-create.patch - WHEN alice main runs create personal/alice/testrepo - AND alice main, expecting failure, runs copy public/testrepo personal/alice/testrepo - THEN stderr contains ERROR: Repository personal/alice/testrepo already exists + WHEN alice main runs create personal/alice/testrepo + AND alice main, expecting failure, runs copy public/testrepo personal/alice/testrepo + THEN stderr contains ERROR: Repository personal/alice/testrepo already exists Users may not copy to paths they may not write to and are not informed if the path already exists if they cannot read it. |