diff options
Diffstat (limited to 'testing/03-treedelta-rules.yarn')
-rw-r--r-- | testing/03-treedelta-rules.yarn | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/03-treedelta-rules.yarn b/testing/03-treedelta-rules.yarn new file mode 100644 index 0000000..e7c0def --- /dev/null +++ b/testing/03-treedelta-rules.yarn @@ -0,0 +1,34 @@ +<!-- -*- markdown -*- --> + +Using the tree deltas in rules +============================== + +Gitano is able to use the tree deltas produced by changes in ref tips when +evaluating whether or not an update is permitted. Since the tree deltas can be +expensive to generate, we only trigger generation of them on demand. As such +they are an area of the code where errors could easily trickle in unless we +keep a close eye on things. + +Start and Target trees +---------------------- + +The first part of the treedelta support are the gitano/starttree and +gitano/targetttee lists. These contain the flattened entry names for +everything in the trees. + + SCENARIO may not create files called FOO + GIVEN a standard instance + AND testinstance using adminkey has patched gitano-admin with no-create-FOO.patch + GIVEN a unix user called alice + AND alice has keys called main + + WHEN testinstance, using adminkey, adds user alice, using alice main + AND testinstance adminkey runs create testrepo alice + AND alice, using main, clones testrepo as testrepo + THEN alice testrepo has no file called FOO + + WHEN alice applies add-a-FOO.patch in testrepo + AND alice, using main, expecting failure, pushes testrepo to testrepo.git + THEN stderr contains No FOOs allowed + + FINALLY the instance is torn down |