summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2014-05-17 10:12:00 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2014-05-17 10:12:00 +0100
commit0a32e641a59199343cf3ae4fbe61546f00047a57 (patch)
treea3d9cbba351ef6952c268dd29334724f3d562caa
parentafec65a4de6cecdeb005c6a2757e0aad7bccf98d (diff)
downloadgitano-0a32e641a59199343cf3ae4fbe61546f00047a57.tar.bz2
Add support for server-side repo checking
-rw-r--r--testing/gitano-test-tool.in6
-rw-r--r--testing/library.yarn8
2 files changed, 14 insertions, 0 deletions
diff --git a/testing/gitano-test-tool.in b/testing/gitano-test-tool.in
index 8436dd6..1a04b31 100644
--- a/testing/gitano-test-tool.in
+++ b/testing/gitano-test-tool.in
@@ -122,6 +122,7 @@ function cmd_setupstandard(owning_user, master_key)
local fh = io.open(clodname, "w")
fh:write('setup.batch "true"\n')
fh:write(('paths.pubkey %q\n'):format(ssh_key_file(owning_user, master_key) .. ".pub"))
+ fh:write(('paths.repos %q\n'):format(user_home(owning_user) .. "/repos"))
fh:write('site.name "Gitano Test Instance"\n')
fh:write('log.prefix "gitano-test"\n')
fh:write(('admin.keyname %q\n'):format(master_key))
@@ -174,6 +175,11 @@ function cmd_findtoken()
print(token)
end
+function cmd_serverlocation(repo)
+ local h = user_home("testinstance")
+ print(table.concat({h, "repos", repo}, "/"))
+end
+
local cmd = table.remove(argv, 1)
if _G['cmd_' .. cmd] then
_G['cmd_' .. cmd](unpack(argv))
diff --git a/testing/library.yarn b/testing/library.yarn
index c49021e..89e8da1 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -37,6 +37,14 @@ Repository access
IMPLEMENTS WHEN ([a-z][a-z0-9]*),? using ([a-z][a-z0-9]*),? clones ([^ ]+) as ([^ ]+)
$GTT cloneviassh $MATCH_1 $MATCH_2 "$MATCH_3" "$MATCH_4"
+Server-side repository checking for behind-the-scenes work
+----------------------------------------------------------
+
+ IMPLEMENTS THEN server-side ([^ ]+) file ([^ ]+) contains (.+)
+ cd "$($GTT serverlocation $MATCH_1)"
+ grep -q "$MATCH_3" "$MATCH_2"
+
+
Clone manipulation
------------------