]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use different keys in each cache test
authorNick Porter <nick@portercomputing.co.uk>
Wed, 1 Feb 2023 19:24:52 +0000 (19:24 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 1 Feb 2023 19:24:52 +0000 (19:24 +0000)
Allows for parallel runs of cache tests that use redis without the tests
interfering with each other.

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

index 56e0600c4dd5a89686ccba277bb2438117580221..d4cc485797dbbcd7c8315f831b60b5f1fb15091b 100644 (file)
@@ -6,7 +6,7 @@
 #  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-Octets-0 := 0xaa11bb00cc00dd00
 &Tmp-String-1 := "foo\000bar\000baz"
 
 # 0. Sanity check
@@ -21,7 +21,7 @@ if (!updated) {
 }
 
 # Now add a second entry, with the value diverging after the first null byte
-&Tmp-Octets-0 := 0xaa00bb00cc00ee00
+&Tmp-Octets-0 := 0xaa11bb00cc00ee00
 &Tmp-String-1 := "bar\000baz"
 
 # 2. Should create a *new* entry and not update the existing one
@@ -34,7 +34,7 @@ if (!updated) {
 
 # 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
+&Tmp-Octets-0 := 0xaa11bb00cc00dd00
 
 cache_bin_key_octets.load
 if (!updated) {
@@ -52,7 +52,7 @@ if (&Tmp-String-1 != "foo\000bar\000baz") {
 &request -= &Tmp-String-1[*]
 
 # Now try and get the second entry
-&Tmp-Octets-0 := 0xaa00bb00cc00ee00
+&Tmp-Octets-0 := 0xaa11bb00cc00ee00
 
 cache_bin_key_octets.load
 if (!updated) {
@@ -73,7 +73,7 @@ if (&Tmp-String-1 != "bar\000baz") {
 #  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-IP-Address-0 := 192.168.1.1
 &Tmp-String-1 := "foo\000bar\000baz"
 
 cache_bin_key_ipaddr.store
@@ -82,7 +82,7 @@ if (!updated) {
 }
 
 # Now add a second entry
-&Tmp-IP-Address-0:= 192.168.0.2
+&Tmp-IP-Address-0:= 192.168.1.2
 &Tmp-String-1 := "bar\000baz"
 
 cache_bin_key_ipaddr.store
@@ -93,7 +93,7 @@ if (!updated) {
 &request -= &Tmp-String-1[*]
 
 # Now retrieve the first entry
-&Tmp-IP-Address-0 := 192.168.0.1
+&Tmp-IP-Address-0 := 192.168.1.1
 
 cache_bin_key_ipaddr.load
 if (!updated) {
@@ -111,7 +111,7 @@ if (&Tmp-String-1 != "foo\000bar\000baz") {
 &request -= &Tmp-String-1[*]
 
 # Now try and get the second entry
-&Tmp-IP-Address-0 := 192.168.0.2
+&Tmp-IP-Address-0 := 192.168.1.2
 
 cache_bin_key_ipaddr.load
 if (!updated) {
index 9c632f2a3942ffbe682edda0e8039b8c48e0f858..fe50091b8564a4c9517fdda2b1e37af9eb70dffe 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE:
 #
-&Tmp-String-0 := 'testkey'
+&Tmp-String-0 := 'testkey1'
 
 #
 # 0.  Basic store and retrieve
index 26c4731178d06a1f40ead5cbe524caa8cf3b6fb9..0bdf36767f96c70ad4cc75bf1dbddb6c93e6f7f6 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: cache-logic
 #
-&Tmp-String-0 := 'testkey'
+&Tmp-String-0 := 'testkey3'
 
 # Reply attributes
 &reply.Reply-Message := 'hello'
index 3153504bab4a0ee12c9de4d43221d07eded2c08e..204e9ad13838c6ebb51850b258dc602d41b2a492 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: cache-logic
 #
-&Tmp-String-0 := 'testkey'
+&Tmp-String-0 := 'testkey2'
 
 # Reply attributes
 &reply.Reply-Message := 'hello'