]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
quote bare words in redis ippool tool tests
authorAlan T. DeKok <aland@freeradius.org>
Mon, 14 Apr 2025 15:27:38 +0000 (11:27 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 14 Apr 2025 18:35:41 +0000 (14:35 -0400)
src/tests/modules/redis_ippool/alloc.unlang
src/tests/modules/redis_ippool/pool_tool_delete.unlang
src/tests/modules/redis_ippool/pool_tool_modify.unlang
src/tests/modules/redis_ippool/pool_tool_release.unlang
src/tests/modules/redis_ippool/pool_tool_static.unlang
src/tests/modules/redis_ippool/release.unlang
src/tests/modules/redis_ippool/static.unlang
src/tests/modules/redis_ippool/static_dynamic.unlang
src/tests/modules/redis_ippool/static_unassign.unlang
src/tests/modules/redis_ippool/update.unlang
src/tests/modules/redis_ippool/update_alloc.unlang

index e8460ede25b21b42140bc0e7c721168da3c87858..9733bf31af5715f88d740173e71660e091665c87 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_alloc'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -75,7 +75,7 @@ reply := {}
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.1.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.1.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.1.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.1.0')
 
 #
 #  Check we get the same lease, with the same lease time
index 9caeab8937d7af5d40f00c26e8224a5c69a45dd5..8470b4411c2791d0d3bc87330325941ab69afcd8 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_delete'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -27,24 +27,24 @@ if !(reply.Framed-IP-Address == 192.168.0.1) {
 #
 #  Delete the IP address
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -d, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-d', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Verify the association with the device has been removed
 #
-if !(%redis(EXISTS, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}) == '0') {
+if !(%redis('EXISTS', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}") == '0') {
        test_fail
 }
 
 #
 #  Verify the hash information is removed
 #
-if !(%redis(EXISTS, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}) == '0') {
+if !(%redis('EXISTS', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}") == '0') {
        test_fail
 }
 
 # Check the ZSCORE
-if !(%redis(ZCOUNT, {%{control.IP-Pool.Name}%}:pool, -inf, +inf) == 0) {
+if !(%redis('ZCOUNT', "{%{control.IP-Pool.Name}%}:pool", '-inf', '+inf') == 0) {
        test_fail
 }
 
index f03e81c57dbfbd80e65aa2c700a32a179c3ac481..3e2e4dfc583c514d79cda323b5302b6e8ae61480 100644 (file)
@@ -8,24 +8,24 @@ control.IP-Pool.Name := 'test_tool_modify'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Verify the range was set OK
 #
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:192.168.0.1, range) == '192.168.0.0') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:192.168.0.1", 'range') == '192.168.0.0') {
        test_fail
 }
 
 #
 #  Modify the range
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -m, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 10.0.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-m', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '10.0.0.0')
 
 #
 #  Check it was updated
 #
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:192.168.0.1, range) == '10.0.0.0') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:192.168.0.1", 'range') == '10.0.0.0') {
        test_fail
 }
 
index 4304f7ed7de4ff542e711c8d8183c14934e4b599..5ce63745bd6d0354b8b737ab7f91d8988afc30a9 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_tool_release'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -27,32 +27,32 @@ if !(reply.Framed-IP-Address == 192.168.0.1) {
 #
 #  Release the IP address
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -r, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-r', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Verify the association with the device has been removed
 #
-if !(%redis(EXISTS, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}) == '0') {
+if !(%redis('EXISTS', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}") == '0') {
        test_fail
 }
 
 #
 #  Verify the hash information is retained
 #
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, device) == '00:11:22:33:44:55') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'device') == '00:11:22:33:44:55') {
        test_fail
 }
 
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, gateway) == '127.0.0.1') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'gateway') == '127.0.0.1') {
        test_fail
 }
 
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, range) == '192.168.0.0') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'range') == '192.168.0.0') {
        test_fail
 }
 
 # Check the ZSCORE
-if !(%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) == 0) {
+if !(%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) == 0) {
        test_fail
 }
 
index 8f5cf4d43b666d6f0abf9aad8e8e1e3d2e721f26..1a4aa8cc874a8deff831ae7af860da197ef43091 100644 (file)
@@ -9,12 +9,12 @@ control.IP-Pool.Name := 'test_tool_static'
 #
 #  Add a dynamic IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Add a static IP assigned to the calling station in the request
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -33,37 +33,37 @@ if !(reply.Framed-IP-Address == 192.168.0.10) {
 #
 #  Fetch the ZSCORE now on the address
 #
-zscore := %redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address})
+zscore := %redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address})
 
 #
 #  Attempt to re-assign static lease
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check the ZSCORE hasn't changed
 #
-if !(%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) == %{zscore}) {
+if !(%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) == %{zscore}) {
        test_fail
 }
 
 #
 #  Remove the static assignment - leaves the lease with its remaining time to expire
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -U, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name})
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-U', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name})
 
 #
 #  Attempt to assign the address to another device - should fail
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:00, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:00', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check the original device is still assigned to the address
 #
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:192.168.0.10, 'device') == 'aa:bb:cc:dd:ee:ff') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:192.168.0.10", 'device') == 'aa:bb:cc:dd:ee:ff') {
        test_fail
 }
-if !(%redis(GET, {%{control.IP-Pool.Name}}:device:aa:bb:cc:dd:ee:ff) == '192.168.0.10') {
+if !(%redis('GET', "{%{control.IP-Pool.Name}}:device:aa:bb:cc:dd:ee:ff") == '192.168.0.10') {
        test_fail
 }
 
@@ -86,19 +86,19 @@ if !(reply.Framed-IP-Address == 192.168.0.1) {
 #
 #  Attempt to statically assign this to another device
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.1/32, -O, aa:bb:cc:dd:ee:00, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.1/32', '-O', 'aa:bb:cc:dd:ee:00', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check the original device is still assigned to the address and the lease is dynamic
 #
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:192.168.0.1, 'device') == %{Calling-Station-Id}) {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:192.168.0.1", 'device') == %{Calling-Station-Id}) {
        test_fail
 }
-if !(%redis(GET, {%{control.IP-Pool.Name}}:device:11:22:33:44:55:66) == '192.168.0.1') {
+if !(%redis('GET', "{%{control.IP-Pool.Name}}:device:11:22:33:44:55:66") == '192.168.0.1') {
        test_fail
 }
 
-zscore := %redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, 192.168.0.1)
+zscore := %redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", '192.168.0.1')
 if !(zscore < (uint64)0x10000000000000) {
        test_fail
 }
@@ -106,19 +106,19 @@ if !(zscore < (uint64)0x10000000000000) {
 #
 #  Now assign it as a static lease for the current device
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.1/32, -O, %{Calling-Station-Id}, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.1/32', '-O', %{Calling-Station-Id}, '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check that the ZSCORE is maintained, simply with the static bit set
 #
-if !(%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, 192.168.0.1) == (zscore + (uint64) 0x10000000000000)) {
+if !(%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", '192.168.0.1') == (zscore + (uint64) 0x10000000000000)) {
        test_fail
 }
 
 #
 #  And that the expiry is now removed on the device
 #
-if (%redis(TTL, {%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}) != '-1') {
+if (%redis('TTL', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}") != '-1') {
        test_fail
 }
 
index b7868f5bff5ac296cabe1970c124d25b35104b11..cb938b0bfe4983127b9ed53084e88e5eb50e8612 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_release'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -39,31 +39,31 @@ if (!(updated)) {
 #
 #  Verify the association with the device has been removed
 #
-if (!(%redis(EXISTS, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}) == '0')) {
+if (!(%redis('EXISTS', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}") == '0')) {
        test_fail
 }
 
 #
 #  Verify the hash information is retained
 #
-if (!(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, device) == '00:11:22:33:44:55')) {
+if (!(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'device') == '00:11:22:33:44:55')) {
        test_fail
 }
 
-if (!(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, gateway) == '127.0.0.1')) {
+if (!(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'gateway') == '127.0.0.1')) {
        test_fail
 }
 
-if (!(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, range) == '192.168.0.0')) {
+if (!(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'range') == '192.168.0.0')) {
        test_fail
 }
 
 # Check the ZSCORE - releasing an address sets the ZSCORE to now - 1
-if (%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) > %c) {
+if (%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) > %c) {
        test_fail
 }
 
-if ((%c - %redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) > 10)) {
+if ((%c - %redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) > 10)) {
        test_fail
 }
 
index 1afd7aba2d7c11cb3b1fbb5bbd5922cf323207d9..f9c20c6398ef9320aa95ff8c9538701b5b0ed390 100644 (file)
@@ -8,12 +8,12 @@ control.IP-Pool.Name := 'test_static'
 #
 #  Add a dynamic IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Add a static IP assigned to the calling station in the request
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -49,7 +49,7 @@ redis_ippool.renew {
 #
 #  Verify no expiry has been set on device
 #
-if (%redis(TTL, {%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}) != '-1') {
+if (%redis('TTL', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}") != '-1') {
        test_fail
 }
 
@@ -73,19 +73,19 @@ if (!(updated)) {
 #
 #  Verify the association with the device remains
 #
-if (%redis(EXISTS, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}) == '0') {
+if (%redis('EXISTS', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}") == '0') {
        test_fail
 }
 
 #
 #  Verify the hash information is retained
 #
-if (%redis(EXISTS, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}) == '0') {
+if (%redis('EXISTS', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}") == '0') {
        test_fail
 }
 
 # Check the ZSCORE
-if (%redis(ZSCORE, {%{control.IP-Pool.Name}%}:pool, %{reply.Framed-IP-Address}) <= %l) {
+if (%redis('ZSCORE', "{%{control.IP-Pool.Name}%}:pool", %{reply.Framed-IP-Address}) <= %l) {
        test_fail
 }
 
index 0d975f6a5f78d49a3926e4d302291dd0d8c4af16..0185cf288e9a493d584c902b702103f081a617de 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_static_dynamic'
 #
 #  Add a static IP assigned to a calling station not in the request
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation fails - pool only contains an address assigned to another owner
@@ -23,7 +23,7 @@ if (!notfound) {
 #
 #  Add a dynamic IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
index 04ed8047f5da7724ad190a0f3b947c00bfc5e8ad..2ce526498786d18a9744081e0606499710f0b140 100644 (file)
@@ -8,12 +8,12 @@ control.IP-Pool.Name := 'test_static_unassign'
 #
 #  Add a dynamic IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Add a static IP assigned to the calling station in the request
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -A, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-A', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 #
 #  Check allocation
@@ -40,12 +40,12 @@ if (!(reply.Session-Timeout == 30)) {
 #
 #  Un-assign static allocation
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -U, 192.168.0.10/32, -O, aa:bb:cc:dd:ee:ff, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name})
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-U', '192.168.0.10/32', '-O', 'aa:bb:cc:dd:ee:ff', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name})
 
 #
 #  Check ZSCORE is now < 2^52 - the "static bit"
 #
-if (%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) >= (uint64) 0x10000000000000) {
+if (%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) >= (uint64) 0x10000000000000) {
        test_fail
 }
 
@@ -54,7 +54,7 @@ if (%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) >
 #  This is based on the initial lease duration given (of 30 sec) but will have reduced
 #  due to elapsed time since the allocation.
 #
-if (%redis(TTL, {%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}) < 20) {
+if (%redis('TTL', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}") < 20) {
        test_fail
 }
 
@@ -80,19 +80,19 @@ if (!updated) {
 #
 #  Verify the association with the device is removed
 #
-if (%redis(EXISTS, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}) != '0') {
+if (%redis('EXISTS', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}") != '0') {
        test_fail
 }
 
 # Check the ZSCORE
-if (%redis(ZSCORE, {%{control.IP-Pool.Name}%}:pool, %{reply.Framed-IP-Address}) > %l) {
+if (%redis('ZSCORE', "{%{control.IP-Pool.Name}%}:pool", %{reply.Framed-IP-Address}) > %l) {
        test_fail
 }
 
 #
 #  Delete original dynamic address - so only the previously static one remains
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -d, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name})
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-d', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name})
 
 #
 #  Perform IP allocation for alternative device
@@ -117,7 +117,7 @@ if !(reply.Framed-IP-Address == '192.168.0.10') {
 #
 #  Verify the IP hash has been set to point to the new device
 #
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, device) == '00:11:22:33:44:55') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'device') == '00:11:22:33:44:55') {
        test_fail
 }
 
index e3c0db4f2d1fc41f109601872d0276e84d91eab2..50fa2fddb5ad5819a0c5006a229677c05cbe6723 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_update'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 # 1. Check allocation
 redis_ippool
@@ -27,12 +27,12 @@ if !(reply.Session-Timeout == 30) {
 }
 
 # 4. Verify the gateway was set
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, gateway) == '127.0.0.1') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'gateway') == '127.0.0.1') {
        test_fail
 }
 
 # 5. Add another IP addresses
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.1.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.1.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.1.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.1.0')
 
 # 6. Verify that the lease time is extended
 Framed-IP-Address := reply.Framed-IP-Address
@@ -49,27 +49,27 @@ if !(reply.Session-Timeout == 60) {
 }
 
 # 8. Check ZSCORE reflects that
-if !((%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) - %c) > 50) {
+if !((%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) - %c) > 50) {
        test_fail
 }
 
 # 9.
-if !((%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) - %c) < 70) {
+if !((%redis('ZSCORE', "{%{control.IP-Pool.Name}}:pool", %{reply.Framed-IP-Address}) - %c) < 70) {
        test_fail
 }
 
 # 10. Verify the lease is still associated with the device
-if !(reply.Framed-IP-Address == %redis(GET, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID})) {
+if !(reply.Framed-IP-Address == %redis('GET', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}")) {
        test_fail
 }
 
 # 11. And that the device object will expire a suitable number of seconds into the future
-if !(%redis(TTL, {%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}) == 60) {
+if !(%redis('TTL', "{%{control.IP-Pool.Name}}:device:%{Calling-Station-ID}") == 60) {
        test_fail
 }
 
 # 12. Verify the gateway was updated
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{Framed-IP-Address}, gateway) == '127.0.0.2') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{Framed-IP-Address}", 'gateway') == '127.0.0.2') {
        test_fail
 }
 
@@ -101,7 +101,7 @@ if (!invalid) {
 }
 
 # 16. Verify the lease is still associated with the previous device
-if !(reply.Framed-IP-Address == %redis(GET, {%{control.IP-Pool.Name}}:device:00:11:22:33:44:55)) {
+if !(reply.Framed-IP-Address == %redis('GET', "{%{control.IP-Pool.Name}}:device:00:11:22:33:44:55")) {
        test_fail
 }
 
index 85164c0815f342ade2e9039caab5caaea90fdccc..3948ba1d76261047802ac494fb87399488ef38f7 100644 (file)
@@ -8,7 +8,7 @@ control.IP-Pool.Name := 'test_update_alloc'
 #
 #  Add IP addresses
 #
-%exec(./build/bin/local/rlm_redis_ippool_tool, -a, 192.168.0.1/32, $ENV{REDIS_IPPOOL_TEST_SERVER}:30001, %{control.IP-Pool.Name}, 192.168.0.0)
+%exec('./build/bin/local/rlm_redis_ippool_tool', '-a', '192.168.0.1/32', '$ENV{REDIS_IPPOOL_TEST_SERVER}:30001', %{control.IP-Pool.Name}, '192.168.0.0')
 
 # 1. Check allocation
 redis_ippool
@@ -30,7 +30,7 @@ if !(reply.Session-Timeout == 60) {
 }
 
 # 4. Verify the gateway was set
-if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}, gateway) == '127.0.0.1') {
+if !(%redis('HGET', "{%{control.IP-Pool.Name}}:ip:%{reply.Framed-IP-Address}", 'gateway') == '127.0.0.1') {
        test_fail
 }