1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
includecommon("netsync.lua")
mtn_setup()
netsync.setup()
writefile("testfile", "I am you and you are me and we are all together.")
check(mtn2("add", "testfile"), 0, false, false)
check(mtn2("commit", "--branch=testbranch", "--message=foo"), 0, false, false)
check(mtn2("genkey", "foo@foo"), 0, false, false, string.rep("foo@foo\n",2))
srv = netsync.start()
srv:push("testbranch", 2)
srv:pull("testbranch", 3)
check(mtn3("ls", "keys"), 0, true, false)
check(not qgrep("foo@foo", "stdout"))
writefile("testfile", "stuffty stuffty")
check(mtn2("commit", "--branch=testbranch", "--message=foo", "--key=foo@foo"), 0, false, false)
srv:push("testbranch", 2)
srv:pull("testbranch", 3)
srv:finish()
check(mtn3("ls", "keys"), 0, true, false)
check(qgrep("foo@foo", "stdout"))
|