]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove Tmp-Group from keyword tests that don't use lists
authorNick Porter <nick@portercomputing.co.uk>
Fri, 5 Jan 2024 11:57:37 +0000 (11:57 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 5 Jan 2024 11:57:37 +0000 (11:57 +0000)
src/tests/keywords/edit-add-create
src/tests/keywords/edit-list-star

index 2fc291a0abdde4577013e578496d964c925fe7ee..e17e34b9a72aa211b368fa22af94335e5b50fe2d 100644 (file)
@@ -5,6 +5,7 @@ string test_string
 uint32 test_integer1
 uint32 test_integer2
 uint32 test_integer3
+group test_group
 
 &test_integer1 += 4
 if !(&test_integer1 == 4) {
@@ -17,15 +18,15 @@ if !(&test_string == "bar") {
        test_fail
 }
 
-&Tmp-Group-0 += {
+&test_group += {
        &Filter-Id = "foo"
 }
 
-if !&Tmp-Group-0 {
+if !&test_group {
        test_fail
 }
 
-if !(&Tmp-Group-0.Filter-Id == "foo") {
+if !(&test_group.Filter-Id == "foo") {
        test_fail
 }
 
index 79a38441db313513f8610fd038d32386ecd6d928..d8a33e24b516aeba3bf88edf9b5e9dadf55b143e 100644 (file)
@@ -1,21 +1,24 @@
 #
 #  PRE: edit-leaf-star
 #
-&Tmp-Group-0.NAS-Port := { 1, 3, 5, 7, 11 }
+group test_group1
+group test_group2
+
+&test_group1.NAS-Port := { 1, 3, 5, 7, 11 }
 &Port-Limit := 0
 
 #
 #  Do operations on sets of inputs.
 #
-&Port-Limit += &Tmp-Group-0.NAS-Port[*]
+&Port-Limit += &test_group1.NAS-Port[*]
 if (!(&Port-Limit == 27)) {
        test_fail
 }
 
-&Tmp-Group-1 := &Tmp-Group-0
+&test_group2 := &test_group1
 &Port-Limit := 0
 
-&Port-Limit += &Tmp-Group-1.NAS-Port[*]
+&Port-Limit += &test_group2.NAS-Port[*]
 if (!(&Port-Limit == 27)) {
        test_fail
 }