@@ -9,12 +9,12 @@ control.IP-Pool.Name := 'test_tool_static'
99#
1010# Add a dynamic IP addresses
1111#
12- %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)
12+ %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' )
1313
1414#
1515# Add a static IP assigned to the calling station in the request
1616#
17- %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)
17+ %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' )
1818
1919#
2020# Check allocation
@@ -33,37 +33,37 @@ if !(reply.Framed-IP-Address == 192.168.0.10) {
3333#
3434# Fetch the ZSCORE now on the address
3535#
36- zscore := %redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address})
36+ zscore := %redis(' ZSCORE', " {%{control.IP-Pool.Name}}:pool" , %{reply.Framed-IP-Address})
3737
3838#
3939# Attempt to re-assign static lease
4040#
41- %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)
41+ %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' )
4242
4343#
4444# Check the ZSCORE hasn't changed
4545#
46- if !(%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) == %{zscore}) {
46+ if !(%redis(' ZSCORE', " {%{control.IP-Pool.Name}}:pool" , %{reply.Framed-IP-Address}) == %{zscore}) {
4747 test_fail
4848}
4949
5050#
5151# Remove the static assignment - leaves the lease with its remaining time to expire
5252#
53- %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})
53+ %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})
5454
5555#
5656# Attempt to assign the address to another device - should fail
5757#
58- %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)
58+ %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' )
5959
6060#
6161# Check the original device is still assigned to the address
6262#
63- if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:192.168.0.10, 'device') == 'aa:bb:cc:dd:ee:ff') {
63+ if !(%redis(' HGET', " {%{control.IP-Pool.Name}}:ip:192.168.0.10" , 'device') == 'aa:bb:cc:dd:ee:ff') {
6464 test_fail
6565}
66- if !(%redis(GET, {%{control.IP-Pool.Name}}:device:aa:bb:cc:dd:ee:ff) == '192.168.0.10') {
66+ if !(%redis(' GET', " {%{control.IP-Pool.Name}}:device:aa:bb:cc:dd:ee:ff" ) == '192.168.0.10') {
6767 test_fail
6868}
6969
@@ -86,39 +86,39 @@ if !(reply.Framed-IP-Address == 192.168.0.1) {
8686#
8787# Attempt to statically assign this to another device
8888#
89- %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)
89+ %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' )
9090
9191#
9292# Check the original device is still assigned to the address and the lease is dynamic
9393#
94- if !(%redis(HGET, {%{control.IP-Pool.Name}}:ip:192.168.0.1, 'device') == %{Calling-Station-Id}) {
94+ if !(%redis(' HGET', " {%{control.IP-Pool.Name}}:ip:192.168.0.1" , 'device') == %{Calling-Station-Id}) {
9595 test_fail
9696}
97- if !(%redis(GET, {%{control.IP-Pool.Name}}:device:11:22:33:44:55:66) == '192.168.0.1') {
97+ if !(%redis(' GET', " {%{control.IP-Pool.Name}}:device:11:22:33:44:55:66" ) == '192.168.0.1') {
9898 test_fail
9999}
100100
101- zscore := %redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, 192.168.0.1)
101+ zscore := %redis(' ZSCORE', " {%{control.IP-Pool.Name}}:pool", ' 192.168.0.1' )
102102if !(zscore < (uint64)0x10000000000000) {
103103 test_fail
104104}
105105
106106#
107107# Now assign it as a static lease for the current device
108108#
109- %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)
109+ %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' )
110110
111111#
112112# Check that the ZSCORE is maintained, simply with the static bit set
113113#
114- if !(%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, 192.168.0.1) == (zscore + (uint64) 0x10000000000000)) {
114+ if !(%redis(' ZSCORE', " {%{control.IP-Pool.Name}}:pool", ' 192.168.0.1' ) == (zscore + (uint64) 0x10000000000000)) {
115115 test_fail
116116}
117117
118118#
119119# And that the expiry is now removed on the device
120120#
121- if (%redis(TTL, {%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}) != '-1') {
121+ if (%redis(' TTL', " {%{control.IP-Pool.Name}}:device:%{Calling-Station-Id}" ) != '-1') {
122122 test_fail
123123}
124124
0 commit comments