[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: b97a29163d6166d6d5e1d15f43
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: b97a29163d6166d6d5e1d15f437f8325ac987070 |
Date: |
Sat, 20 Nov 2010 06:26:14 GMT |
revision: b97a29163d6166d6d5e1d15f437f8325ac987070
date: 2010-11-20T06:25:56
author: Timothy Brownawell <address@hidden>
branch: net.venge.monotone
changelog:
Fix netsync_negotiation test to actually work with real previous-version
monotones.
manifest:
format_version "1"
new_manifest [0670ef8ae4e1f57a530ea471b2a303b529ddb0c5]
old_revision [c26b91d1884512efa7adf1b209f207d142c03606]
add_file "tests/netsync_negotiation/netsync7.lua"
content [e497dbeb2144af7080744ed6a4ef7249cd9411f0]
patch "tests/netsync_negotiation/__driver__.lua"
from [9cdfd4875c4154afbaf00395e9ea1ec2322430bd]
to [09a831c685d4f9580f66f523a18451ca9f719ce3]
patch "tests/netsync_negotiation/netsync6.lua"
from [fd4a458af29de669826b05be6032da94a238f863]
to [b063acb27d19417410fdea335842d25e01d684a2]
============================================================
--- tests/netsync_negotiation/__driver__.lua 9cdfd4875c4154afbaf00395e9ea1ec2322430bd
+++ tests/netsync_negotiation/__driver__.lua 09a831c685d4f9580f66f523a18451ca9f719ce3
@@ -15,8 +15,12 @@ function make_old(ver)
else
rcfile = "test_hooks.lua"
end
+ local nostd = "--no-standard-rcfiles"
+ if ver < 8 then
+ nostd = "--nostd"
+ end
local fn = function (...)
- return {exe, "--no-standard-rcfiles", "--root=.",
+ return {exe, nostd, "--root=.",
"--confdir=.",
"--rcfile="..rcfile,
"address@hidden",
@@ -76,6 +80,22 @@ end
check(my_mtn("commit", "--message=child commit"), 0, nil, false)
end
+function check_same_revs(cmd1, cmd2)
+ check(cmd1, 0, true, false)
+ local data1 = {}
+ for l in io.lines("stdout") do table.insert(data1, l) end
+ check(cmd2, 0, true, false)
+ local data2 = {}
+ for l in io.lines("stdout") do table.insert(data2, l) end
+ L("Command 1 has ", table.getn(data1), " lines.")
+ L("Command 2 has ", table.getn(data2), " lines.")
+ check(table.getn(data1) == table.getn(data2))
+ for i = 1, table.getn(data1) do
+ local hash_len = 40
+ check(data1[i]:sub(1, hash_len) == data2[i]:sub(1, hash_len))
+ end
+end
+
function check_pair(client, server)
-- setup database contents
client.reset()
@@ -96,8 +116,8 @@ function check_pair(client, server)
-- check for correct/matching contents
check_same_stdout(client.fn("automate", "select", "i:"),
server.fn("automate", "select", "i:"))
- check_same_stdout(client.fn("heads", "--branch=testbranch"),
- server.fn("heads", "--branch=testbranch"))
+ check_same_revs(client.fn("heads", "--branch=testbranch"),
+ server.fn("heads", "--branch=testbranch"))
-- there should be 13 certs - 4 per rev, plus an extra date cert
-- on the common base revision
check(client.fn("db", "info"), 0, true)
============================================================
--- tests/netsync_negotiation/netsync6.lua fd4a458af29de669826b05be6032da94a238f863
+++ tests/netsync_negotiation/netsync6.lua b063acb27d19417410fdea335842d25e01d684a2
@@ -2,3 +2,6 @@ end
function get_passphrase(key)
return key
end
+function get_revision_cert_trust()
+ return true
+end
\ No newline at end of file
============================================================
--- /dev/null
+++ tests/netsync_negotiation/netsync7.lua e497dbeb2144af7080744ed6a4ef7249cd9411f0
@@ -0,0 +1,4 @@
+include("test_hooks.lua")
+function get_revision_cert_trust()
+ return true
+end
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: b97a29163d6166d6d5e1d15f437f8325ac987070,
code <=