[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: 917c617f19420ad47a9be9ee17
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: 917c617f19420ad47a9be9ee1785ad6d5af3746a |
Date: |
Mon, 21 Feb 2011 00:08:29 +0100 (CET) |
revision: 917c617f19420ad47a9be9ee1785ad6d5af3746a
date: 2011-02-20T22:41:33
author: address@hidden
branch: net.venge.monotone
changelog:
* test/func/netsync_bind_opt/__driver__.lua: if netstat is on PATH,
ensure that multiple --bind options really make mtn listen on
different interfaces
manifest:
format_version "1"
new_manifest [5f47893b6939beeef04896c0ce8b693cbe6285a3]
old_revision [1088eb68beea6e3ded60458669eeaf53b454f80d]
add_dir "test/func/netsync_bind_opt"
add_file "test/func/netsync_bind_opt/__driver__.lua"
content [153c2be3d3c3c37b4fea590633d2d3be9bae5e82]
============================================================
--- /dev/null
+++ test/func/netsync_bind_opt/__driver__.lua 153c2be3d3c3c37b4fea590633d2d3be9bae5e82
@@ -0,0 +1,27 @@
+skip_if(not existsonpath("netstat"))
+
+includecommon("netsync.lua")
+mtn_setup()
+netsync.setup()
+
+math.randomseed(get_pid())
+local port = math.random(1024, 65535)
+
+-- test with host:port
+srv = netsync.start({"--bind", "localhost:" .. port})
+check({"netstat", "-a", "-n"}, 0, true, false)
+check(qgrep("127[.]0[.]0[.]1[.:]" .. port, "stdout"))
+srv:stop()
+
+-- test with ip:port
+srv = netsync.start({"--bind", "127.0.0.1:" .. port})
+check({"netstat", "-a", "-n"}, 0, true, false)
+check(qgrep("127[.]0[.]0[.]1[.:]" .. port, "stdout"))
+srv:stop()
+
+-- test only with :port
+srv = netsync.start({"--bind", ":" .. port})
+check({"netstat", "-a", "-n"}, 0, true, false)
+check(qgrep("([*]|0[.]0[.]0[.]0)[.:]" .. port, "stdout"))
+srv:stop()
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: 917c617f19420ad47a9be9ee1785ad6d5af3746a,
code <=