]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove Tmp- attributes from cache module tests
authorNick Porter <nick@portercomputing.co.uk>
Fri, 5 Jan 2024 14:27:58 +0000 (14:27 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 5 Jan 2024 15:39:37 +0000 (15:39 +0000)
src/tests/modules/cache_rbtree/cache-bin.unlang
src/tests/modules/cache_rbtree/cache-logic.unlang
src/tests/modules/cache_rbtree/cache-method-bin.unlang
src/tests/modules/cache_rbtree/cache-method-logic.unlang
src/tests/modules/cache_rbtree/cache-method-update.unlang
src/tests/modules/cache_rbtree/cache-update.unlang
src/tests/modules/cache_rbtree/cache-xlat.unlang
src/tests/modules/cache_rbtree/module.conf
src/tests/modules/cache_redis/module.conf

index a3dde4f089e62a6f450998b7a1edcb0c04da29ac..f587ea56f50639f15c8e5ff81bf8033bfaa9e966 100644 (file)
@@ -6,11 +6,11 @@
 #  Series of tests to check for binary safe operation of the cache module
 #  both keys and values should be binary safe.
 #
-&Tmp-Octets-0 := 0xaa00bb00cc00dd00
-&Tmp-String-1 := "foo\000bar\000baz"
+&Class := 0xaa00bb00cc00dd00
+&Callback-Id := "foo\000bar\000baz"
 
 # 0. Sanity check
-if (&Tmp-String-1 != "foo\000bar\000baz") {
+if (&Callback-Id != "foo\000bar\000baz") {
        test_fail
 }
 
@@ -21,8 +21,8 @@ if (!updated) {
 }
 
 # Now add a second entry, with the value diverging after the first null byte
-&Tmp-Octets-0 := 0xaa00bb00cc00ee00
-&Tmp-String-1 := "bar\000baz"
+&Class := 0xaa00bb00cc00ee00
+&Callback-Id := "bar\000baz"
 
 # 2. Should create a *new* entry and not update the existing one
 cache_bin_key_octets.store
@@ -30,51 +30,51 @@ if (!updated) {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # If the key is binary safe, we should now be able to retrieve the first entry
 # if it's not, the above test will likely fail, or we'll get the second entry.
-&Tmp-Octets-0 := 0xaa00bb00cc00dd00
+&Class := 0xaa00bb00cc00dd00
 
 cache_bin_key_octets
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 11) {
+if (%(length:%{Callback-Id}) != 11) {
        test_fail
 }
 
-if (&Tmp-String-1 != "foo\000bar\000baz") {
+if (&Callback-Id != "foo\000bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # Now try and get the second entry
-&Tmp-Octets-0 := 0xaa00bb00cc00ee00
+&Class := 0xaa00bb00cc00ee00
 
 cache_bin_key_octets
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 7) {
+if (%length(%{Callback-Id}) != 7) {
        test_fail
 }
 
-if (&Tmp-String-1 != "bar\000baz") {
+if (&Callback-Id != "bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 #
 #  We should also be able to use any fixed length data type as a key
 #  though there are no guarantees this will be portable.
 #
-&Tmp-IP-Address-0 := 192.168.0.1
-&Tmp-String-1 := "foo\000bar\000baz"
+&Framed-IP-Address := 192.168.0.1
+&Callback-Id := "foo\000bar\000baz"
 
 cache_bin_key_ipaddr
 if (!ok) {
@@ -82,50 +82,50 @@ if (!ok) {
 }
 
 # Now add a second entry
-&Tmp-IP-Address-0:= 192.168.0.2
-&Tmp-String-1 := "bar\000baz"
+&Framed-IP-Address:= 192.168.0.2
+&Callback-Id := "bar\000baz"
 
 cache_bin_key_ipaddr
 if (!ok) {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # Now retrieve the first entry
-&Tmp-IP-Address-0 := 192.168.0.1
+&Framed-IP-Address := 192.168.0.1
 
 cache_bin_key_ipaddr
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 11) {
+if (%length(%{Callback-Id}) != 11) {
        test_fail
 }
 
-if (&Tmp-String-1 != "foo\000bar\000baz") {
+if (&Callback-Id != "foo\000bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # Now try and get the second entry
-&Tmp-IP-Address-0 := 192.168.0.2
+&Framed-IP-Address := 192.168.0.2
 
 cache_bin_key_ipaddr
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 7) {
+if (%length(%{Callback-Id}) != 7) {
        test_fail
 }
 
-if (&Tmp-String-1 != "bar\000baz") {
+if (&Callback-Id != "bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 test_pass
index fd46a84c58a307ff0a735d65f458edf8f441194e..a80827bd4a421a5aecb3d022eb3499ce22031568 100644 (file)
@@ -1,12 +1,12 @@
 #
 #  PRE:
 #
-&Tmp-String-0 := 'testkey'
+&Filter-Id := 'testkey'
 
 #
 # 0.  Basic store and retrieve
 #
-&control.Tmp-String-1 := 'cache me'
+&control.Callback-Id := 'cache me'
 
 cache
 if (!ok) {
@@ -14,7 +14,7 @@ if (!ok) {
 }
 
 # 1. Check the module didn't perform a merge
-if (&Tmp-String-1) {
+if (&Callback-Id) {
        test_fail
 }
 
@@ -38,12 +38,12 @@ if (!updated) {
 }
 
 # 5.
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
 # 6. Retrieving the entry should not expire it
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 cache
 if (!updated) {
@@ -51,7 +51,7 @@ if (!updated) {
 }
 
 # 7.
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 else {
@@ -123,11 +123,11 @@ if (&control.Cache-TTL) {
 }
 
 # 17.
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
-&control.Tmp-String-1 := 'cache me2'
+&control.Callback-Id := 'cache me2'
 
 # 18. Updating the Cache-TTL shouldn't make things go boom (we can't really check if it works)
 &control.Cache-TTL := 30
@@ -137,8 +137,8 @@ if (!updated) {
        test_fail
 }
 
-# 19. Request Tmp-String-1 shouldn't have been updated yet
-if (&Tmp-String-1 == &control.Tmp-String-1) {
+# 19. Request Callback-Id shouldn't have been updated yet
+if (&Callback-Id == &control.Callback-Id) {
        test_fail
 }
 
@@ -150,8 +150,8 @@ if (!updated) {
        test_fail
 }
 
-# 21. Request Tmp-String-1 still shouldn't have been updated yet
-if (&Tmp-String-1 == &control.Tmp-String-1) {
+# 21. Request Callback-Id still shouldn't have been updated yet
+if (&Callback-Id == &control.Callback-Id) {
        test_fail
 }
 
@@ -161,13 +161,13 @@ if (!updated) {
        test_fail
 }
 
-# 23. Request Tmp-String-1 should now have been updated
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+# 23. Request Callback-Id should now have been updated
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
 # 24. Check Cache-Merge = yes works as expected (should update current request)
-&control.Tmp-String-1 := 'cache me3'
+&control.Callback-Id := 'cache me3'
 &control.Cache-TTL := -2
 &control.Cache-Merge-New := yes
 
@@ -176,8 +176,8 @@ if (!updated) {
        test_fail
 }
 
-# 25. Request Tmp-String-1 should now have been updated
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+# 25. Request Callback-Id should now have been updated
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
index dc1208fcb91ae4aef285238943ab3219f13c74f6..e246b0e75cee25b3cba8a6eaa33cc7cfc6da04c7 100644 (file)
@@ -6,11 +6,11 @@
 #  Series of tests to check for binary safe operation of the cache module
 #  both keys and values should be binary safe.
 #
-&Tmp-Octets-0 := 0xaa11bb00cc00dd00
-&Tmp-String-1 := "foo\000bar\000baz"
+&Class := 0xaa11bb00cc00dd00
+&Callback-Id := "foo\000bar\000baz"
 
 # 0. Sanity check
-if (&Tmp-String-1 != "foo\000bar\000baz") {
+if (&Callback-Id != "foo\000bar\000baz") {
        test_fail
 }
 
@@ -21,8 +21,8 @@ if (!updated) {
 }
 
 # Now add a second entry, with the value diverging after the first null byte
-&Tmp-Octets-0 := 0xaa11bb00cc00ee00
-&Tmp-String-1 := "bar\000baz"
+&Class := 0xaa11bb00cc00ee00
+&Callback-Id := "bar\000baz"
 
 # 2. Should create a *new* entry and not update the existing one
 cache_bin_key_octets.store
@@ -30,51 +30,51 @@ if (!updated) {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # If the key is binary safe, we should now be able to retrieve the first entry
 # if it's not, the above test will likely fail, or we'll get the second entry.
-&Tmp-Octets-0 := 0xaa11bb00cc00dd00
+&Class := 0xaa11bb00cc00dd00
 
 cache_bin_key_octets.load
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 11) {
+if (%length(%{Callback-Id}) != 11) {
        test_fail
 }
 
-if (&Tmp-String-1 != "foo\000bar\000baz") {
+if (&Callback-Id != "foo\000bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # Now try and get the second entry
-&Tmp-Octets-0 := 0xaa11bb00cc00ee00
+&Class := 0xaa11bb00cc00ee00
 
 cache_bin_key_octets.load
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 7) {
+if (%length(%{Callback-Id}) != 7) {
        test_fail
 }
 
-if (&Tmp-String-1 != "bar\000baz") {
+if (&Callback-Id != "bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 #
 #  We should also be able to use any fixed length data type as a key
 #  though there are no guarantees this will be portable.
 #
-&Tmp-IP-Address-0 := 192.168.1.1
-&Tmp-String-1 := "foo\000bar\000baz"
+&Framed-IP-Address := 192.168.1.1
+&Callback-Id := "foo\000bar\000baz"
 
 cache_bin_key_ipaddr.store
 if (!updated) {
@@ -82,50 +82,50 @@ if (!updated) {
 }
 
 # Now add a second entry
-&Tmp-IP-Address-0:= 192.168.1.2
-&Tmp-String-1 := "bar\000baz"
+&Framed-IP-Address:= 192.168.1.2
+&Callback-Id := "bar\000baz"
 
 cache_bin_key_ipaddr.store
 if (!updated) {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # Now retrieve the first entry
-&Tmp-IP-Address-0 := 192.168.1.1
+&Framed-IP-Address := 192.168.1.1
 
 cache_bin_key_ipaddr.load
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 11) {
+if (%length(%{Callback-Id}) != 11) {
        test_fail
 }
 
-if (&Tmp-String-1 != "foo\000bar\000baz") {
+if (&Callback-Id != "foo\000bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 # Now try and get the second entry
-&Tmp-IP-Address-0 := 192.168.1.2
+&Framed-IP-Address := 192.168.1.2
 
 cache_bin_key_ipaddr.load
 if (!updated) {
        test_fail
 }
 
-if (%length(%{Tmp-String-1}) != 7) {
+if (%length(%{Callback-Id}) != 7) {
        test_fail
 }
 
-if (&Tmp-String-1 != "bar\000baz") {
+if (&Callback-Id != "bar\000baz") {
        test_fail
 }
 
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 test_pass
index fe50091b8564a4c9517fdda2b1e37af9eb70dffe..a526452782eebfd92effb92d017d2c460896056a 100644 (file)
@@ -1,12 +1,12 @@
 #
 #  PRE:
 #
-&Tmp-String-0 := 'testkey1'
+&Filter-Id := 'testkey1'
 
 #
 # 0.  Basic store and retrieve
 #
-&control.Tmp-String-1 := 'cache me'
+&control.Callback-Id := 'cache me'
 
 cache.store
 if (!updated) {
@@ -14,7 +14,7 @@ if (!updated) {
 }
 
 # 1. Check the module didn't perform a merge
-if (&Tmp-String-1) {
+if (&Callback-Id) {
        test_fail
 }
 
@@ -31,12 +31,12 @@ if (!updated) {
 }
 
 # 4.
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
 # 5. Retrieving the entry should not expire it
-&request -= &Tmp-String-1[*]
+&request -= &Callback-Id[*]
 
 cache.load
 if (!updated) {
@@ -44,7 +44,7 @@ if (!updated) {
 }
 
 # 6.
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
@@ -80,11 +80,11 @@ if (&Cache-TTL) {
 }
 
 # 14.
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
-&control.Tmp-String-1 := 'cache me2'
+&control.Callback-Id := 'cache me2'
 
 # 18. Updating the Cache-TTL shouldn't make things go boom (we can't really check if it works)
 &control.Cache-TTL := 666
@@ -94,8 +94,8 @@ if (!updated) {
        test_fail
 }
 
-# 19. Request Tmp-String-1 shouldn't have been updated yet
-if (&Tmp-String-1 == &control.Tmp-String-1) {
+# 19. Request Callback-Id shouldn't have been updated yet
+if (&Callback-Id == &control.Callback-Id) {
        test_fail
 }
 
@@ -107,8 +107,8 @@ if (!updated) {
        test_fail
 }
 
-# 21. Request Tmp-String-1 still shouldn't have been updated yet
-if (&Tmp-String-1 == &control.Tmp-String-1) {
+# 21. Request Callback-Id still shouldn't have been updated yet
+if (&Callback-Id == &control.Callback-Id) {
        test_fail
 }
 
@@ -118,13 +118,13 @@ if (!updated) {
        test_fail
 }
 
-# 23. Request Tmp-String-1 should now have been updated
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+# 23. Request Callback-Id should now have been updated
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
 # 24. Check Cache-Merge = yes works as expected (should update current request)
-&control.Tmp-String-1 := 'cache me3'
+&control.Callback-Id := 'cache me3'
 &control.Cache-TTL := -2
 &control.Cache-Merge-New := yes
 
@@ -133,8 +133,8 @@ if (!updated) {
        test_fail
 }
 
-# 25. Request Tmp-String-1 should now have been updated
-if (&Tmp-String-1 != &control.Tmp-String-1) {
+# 25. Request Callback-Id should now have been updated
+if (&Callback-Id != &control.Callback-Id) {
        test_fail
 }
 
index 0b4c65e75143c058c363007583837af5843ac2d2..a5cc65398d9f9afd27de390cb02b0f4d961eaa96 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: cache-logic
 #
-&Tmp-String-0 := 'testkey3'
+&Filter-Id := 'testkey3'
 
 # Reply attributes
 &reply.Reply-Message := 'hello'
 
 # Request attributes
 &request += {
-       &Tmp-Integer-0 = 10
-       &Tmp-Integer-0 = 20
-       &Tmp-Integer-0 = 30
+       &NAS-Port = 10
+       &NAS-Port = 20
+       &NAS-Port = 30
 }
 
 #
 #  Basic store and retrieve
 #
-&control.Tmp-String-1 := 'cache me'
+&control.Callback-Id := 'cache me'
 
 cache_update.store
 if (!updated) {
@@ -51,27 +51,27 @@ if (&session-state.Reply-Message[1] != 'goodbye') {
        test_fail
 }
 
-# Tmp-String-1 should hold the result of the exec
-if (&Tmp-String-1 != 'echo test') {
+# Callback-Id should hold the result of the exec
+if (&Callback-Id != 'echo test') {
        test_pass
 }
 
 # Literal values should be foo, rad, baz
-if ("%{Tmp-String-2[#]}" != 3) {
+if ("%{Login-LAT-Service[#]}" != 3) {
        test_fail
 }
 
-if (&Tmp-String-2[0] != 'foo') {
+if (&Login-LAT-Service[0] != 'foo') {
        test_fail
 }
 
 debug_request
 
-if (&Tmp-String-2[1] != 'rab') {
+if (&Login-LAT-Service[1] != 'rab') {
        test_fail
 }
 
-if (&Tmp-String-2[2] != 'baz') {
+if (&Login-LAT-Service[2] != 'baz') {
        test_fail
 }
 
index 5db150e07ffc2e52e1dc0a695ec78598cf78f621..962fcec86d370dd9fdde2560fef0953891a5cfd3 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: cache-logic
 #
-&Tmp-String-0 := 'testkey2'
+&Filter-Id := 'testkey2'
 
 # Reply attributes
 &reply.Reply-Message := 'hello'
 
 # Request attributes
 &request += {
-       &Tmp-Integer-0 = 10
-       &Tmp-Integer-0 = 20
-       &Tmp-Integer-0 = 30
+       &NAS-Port = 10
+       &NAS-Port = 20
+       &NAS-Port = 30
 }
 
 #
 #  Basic store and retrieve
 #
-&control.Tmp-String-1 := 'cache me'
+&control.Callback-Id := 'cache me'
 
 cache_update
 if (!ok) {
@@ -45,27 +45,27 @@ if (&session-state.Reply-Message[1] != 'goodbye') {
        test_fail
 }
 
-# Tmp-String-1 should hold the result of the exec
-if (&Tmp-String-1 != 'echo test') {
+# Callback-Id should hold the result of the exec
+if (&Callback-Id != 'echo test') {
        test_fail
 }
 
 # Literal values should be foo, rad, baz
-if ("%{Tmp-String-2[#]}" != 3) {
+if ("%{Login-LAT-Service[#]}" != 3) {
        test_fail
 }
 
-if (&Tmp-String-2[0] != 'foo') {
+if (&Login-LAT-Service[0] != 'foo') {
        test_fail
 }
 
 debug_request
 
-if (&Tmp-String-2[1] != 'rab') {
+if (&Login-LAT-Service[1] != 'rab') {
        test_fail
 }
 
-if (&Tmp-String-2[2] != 'baz') {
+if (&Login-LAT-Service[2] != 'baz') {
        test_fail
 }
 
index 45e4ff11535de17fa6a9b60dab1e33ce7bc8ae31..721af1db30fc07569a16389fe20f2ca6de9b6496 100644 (file)
@@ -1,31 +1,32 @@
 #
 #  PRE: cache-logic
 #
-&Tmp-String-0 := 'testkey'
-&control.Tmp-String-1 := 'cache me'
+&Filter-Id := 'testkey'
+&control.Callback-Id := 'cache me'
 
 cache
 if (!ok) {
         test_fail
 }
 
-&request.Tmp-String-2 := %cache(request.Tmp-String-1)
+&request.Login-LAT-Service := %cache(request.Callback-Id)
 
-if (&Tmp-String-2 != &control.Tmp-String-1) {
+if (&Login-LAT-Service != &control.Callback-Id) {
         test_fail
 }
 
-&Tmp-String-3 := "%cache(request.Tmp-String-4)"
-if (&Tmp-String-3 != "") {
+&Login-LAT-Node := %cache(request.Login-LAT-Port)
+
+if (&Login-LAT-Node) {
         test_fail
 }
 
 # Regression test for deadlock on notfound
-&Tmp-String-0 := 'testkey0'
+&Filter-Id := 'testkey0'
 
-&Tmp-String-3 := %cache(request.Tmp-String-4)
+&Login-LAT-Node := %cache(request.Login-LAT-Port)
 
 # Would previously deadlock
-&Tmp-String-4 := %cache(request.Tmp-String-4)
+&Login-LAT-Port := %cache(request.Login-LAT-Port)
 
 test_pass
index 4a0032386a76b366abd25c63261917780784ce61..b5d666e9e217b4c55f6232dfb8c9bbc6990b8c1c 100644 (file)
@@ -2,12 +2,12 @@
 cache {
        driver = "rbtree"
 
-       key = "%{Tmp-String-0}"
+       key = "%{Filter-Id}"
        ttl = 5
 
        update {
-               &Tmp-String-1 := &control.Tmp-String-1[0]
-               &Tmp-Integer-0 := &control.Tmp-Integer-0[0]
+               &Callback-Id := &control.Callback-Id[0]
+               &NAS-Port := &control.NAS-Port[0]
                &control += &reply
        }
 
@@ -17,7 +17,7 @@ cache {
 cache cache_update {
        driver = "rbtree"
 
-       key = "%{Tmp-String-0}"
+       key = "%{Filter-Id}"
        ttl = 5
 
        #
@@ -31,24 +31,24 @@ cache cache_update {
                &session-state += &reply
 
                # Implicit cast between types (and multivalue copy)
-               &Tmp-String-0 += &Tmp-Integer-0[*]
+               &Filter-Id += &NAS-Port[*]
 
                # Cache the result of an exec
-               &Tmp-String-1 := `/bin/echo 'echo test'`
+               &Callback-Id := `/bin/echo 'echo test'`
 
                # Create three string values and overwrite the middle one
-               &Tmp-String-2 += 'foo'
-               &Tmp-String-2 += 'bar'
-               &Tmp-String-2 += 'baz'
+               &Login-LAT-Service += 'foo'
+               &Login-LAT-Service += 'bar'
+               &Login-LAT-Service += 'baz'
 
-               &Tmp-String-2[1] := 'rab'
+               &Login-LAT-Service[1] := 'rab'
 
                # Create three string values, then remove one
-               &Tmp-String-3 += 'foo'
-               &Tmp-String-3 += 'bar'
-               &Tmp-String-3 += 'baz'
+               &Login-LAT-Node += 'foo'
+               &Login-LAT-Node += 'bar'
+               &Login-LAT-Node += 'baz'
 
-               &Tmp-String-3 -= 'bar'
+               &Login-LAT-Node -= 'bar'
        }
 }
 
@@ -58,22 +58,22 @@ cache cache_update {
 cache cache_bin_key_octets {
        driver = "rbtree"
 
-       key = &Tmp-Octets-0
+       key = &Class
        ttl = 5
 
        update {
-               &Tmp-String-1 := &Tmp-String-1[0]
+               &Callback-Id := &Callback-Id[0]
        }
 }
 
 cache cache_bin_key_ipaddr {
        driver = "rbtree"
 
-       key = &Tmp-IP-Address-0
+       key = &Framed-IP-Address
        ttl = 5
 
        update {
-               &Tmp-String-1 := &Tmp-String-1[0]
+               &Callback-Id := &Callback-Id[0]
        }
 }
 
index ba193bc695d4fc68e3ab92e3ea9f390ec6ce2b7d..107078d59d89808f0a15a5049c5cf50ef18ba31f 100644 (file)
@@ -11,12 +11,12 @@ cache {
                server = $ENV{CACHE_REDIS_TEST_SERVER}:30006
        }
 
-       key = "$ENV{MODULE_TEST_UNLANG}%{Tmp-String-0}"
+       key = "$ENV{MODULE_TEST_UNLANG}%{Filter-Id}"
        ttl = 5
 
        update {
-               &Tmp-String-1 := &control.Tmp-String-1[0]
-               &Tmp-Integer-0 := &control.Tmp-Integer-0[0]
+               &Callback-Id := &control.Callback-Id[0]
+               &NAS-Port := &control.NAS-Port[0]
                &control += &reply
        }
 
@@ -35,7 +35,7 @@ cache cache_update {
                server = $ENV{CACHE_REDIS_TEST_SERVER}:30006
        }
 
-       key = "$ENV{MODULE_TEST_UNLANG}%{Tmp-String-0}"
+       key = "$ENV{MODULE_TEST_UNLANG}%{Filter-Id}"
        ttl = 5
 
        #
@@ -49,24 +49,24 @@ cache cache_update {
                &session-state += &reply
 
                # Implicit cast between types (and multivalue copy)
-               &Tmp-String-0 += &Tmp-Integer-0[*]
+               &Filter-Id += &NAS-Port[*]
 
                # Cache the result of an exec
-               &Tmp-String-1 := `/bin/echo 'echo test'`
+               &Callback-Id := `/bin/echo 'echo test'`
 
                # Create three string values and overwrite the middle one
-               &Tmp-String-2 += 'foo'
-               &Tmp-String-2 += 'bar'
-               &Tmp-String-2 += 'baz'
+               &Login-LAT-Service += 'foo'
+               &Login-LAT-Service += 'bar'
+               &Login-LAT-Service += 'baz'
 
-               &Tmp-String-2[1] := 'rab'
+               &Login-LAT-Service[1] := 'rab'
 
                # Create three string values, then remove one
-               &Tmp-String-3 += 'foo'
-               &Tmp-String-3 += 'bar'
-               &Tmp-String-3 += 'baz'
+               &Login-LAT-Node += 'foo'
+               &Login-LAT-Node += 'bar'
+               &Login-LAT-Node += 'baz'
 
-               &Tmp-String-3 -= 'bar'
+               &Login-LAT-Node -= 'bar'
        }
 }
 
@@ -85,11 +85,11 @@ cache cache_bin_key_octets {
                server = $ENV{CACHE_REDIS_TEST_SERVER}:30006
        }
 
-       key = &Tmp-Octets-0
+       key = &Class
        ttl = 5
 
        update {
-               &Tmp-String-1 := &Tmp-String-1[0]
+               &Callback-Id := &Callback-Id[0]
        }
 }
 
@@ -105,10 +105,10 @@ cache cache_bin_key_ipaddr {
                server = $ENV{CACHE_REDIS_TEST_SERVER}:30006
        }
 
-       key = &Tmp-IP-Address-0
+       key = &Framed-IP-Address
        ttl = 5
 
        update {
-               &Tmp-String-1 := &Tmp-String-1[0]
+               &Callback-Id := &Callback-Id[0]
        }
 }