ctdb-tests: Replace hardcoded IP address in test results
authorMartin Schwenke <martin@meltin.net>
Wed, 20 Jun 2018 07:59:53 +0000 (17:59 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 11 Jul 2018 09:48:37 +0000 (11:48 +0200)
Parameterise them with a variable instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/eventscripts/10.interface.011.sh
ctdb/tests/eventscripts/10.interface.012.sh
ctdb/tests/eventscripts/10.interface.013.sh

index fa8002d5100a13ceb2767ac124b8d24e9caae5e2..7f4302db8dd25433a82f0a90206c45954349b358 100755 (executable)
@@ -19,9 +19,9 @@ while read dev ip bits ; do
                                         "$ip" 445 10.254.254.0 43210
 
        ok <<EOF
-Killed 10/11 TCP connections to released IP 10.0.0.3
+Killed 10/11 TCP connections to released IP ${ip}
 Remaining connections:
-  10.0.0.3:445 10.254.254.1:43211
+  ${ip}:445 10.254.254.1:43211
 EOF
 
        simple_test_event "releaseip" $dev $ip $bits
index 394b718af8567ed694473938c037ed2e527749e7..2ef0fe61a4e0978c9646f85a82743eb28ac19dde 100755 (executable)
@@ -20,11 +20,11 @@ while read dev ip bits ; do
                                         "$ip" 445 10.254.254.0 43210
 
        ok <<EOF
-Killed 10/13 TCP connections to released IP 10.0.0.3
+Killed 10/13 TCP connections to released IP ${ip}
 Remaining connections:
-  10.0.0.3:445 10.254.254.1:43211
-  10.0.0.3:445 10.254.254.2:43212
-  10.0.0.3:445 10.254.254.3:43213
+  ${ip}:445 10.254.254.1:43211
+  ${ip}:445 10.254.254.2:43212
+  ${ip}:445 10.254.254.3:43213
 EOF
 
        simple_test_event "releaseip"  $dev $ip $bits
index 64f365e127564aacc614d4638ac145229541f597..e9a4c304c75045bf52c607fd5f866d6e45c1933e 100755 (executable)
@@ -18,18 +18,18 @@ while read dev ip bits ; do
                                         "$ip" 445 10.254.254.0 43210
 
        ok <<EOF
-Killed 0/$count TCP connections to released IP 10.0.0.3
+Killed 0/$count TCP connections to released IP ${ip}
 Remaining connections:
-  10.0.0.3:445 10.254.254.1:43211
-  10.0.0.3:445 10.254.254.2:43212
-  10.0.0.3:445 10.254.254.3:43213
-  10.0.0.3:445 10.254.254.4:43214
-  10.0.0.3:445 10.254.254.5:43215
-  10.0.0.3:445 10.254.254.6:43216
-  10.0.0.3:445 10.254.254.7:43217
-  10.0.0.3:445 10.254.254.8:43218
-  10.0.0.3:445 10.254.254.9:43219
-  10.0.0.3:445 10.254.254.10:43220
+  ${ip}:445 10.254.254.1:43211
+  ${ip}:445 10.254.254.2:43212
+  ${ip}:445 10.254.254.3:43213
+  ${ip}:445 10.254.254.4:43214
+  ${ip}:445 10.254.254.5:43215
+  ${ip}:445 10.254.254.6:43216
+  ${ip}:445 10.254.254.7:43217
+  ${ip}:445 10.254.254.8:43218
+  ${ip}:445 10.254.254.9:43219
+  ${ip}:445 10.254.254.10:43220
 EOF
 
     simple_test_event "releaseip"  $dev $ip $bits