]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove Tmp- attributes from unit tests
authorNick Porter <nick@portercomputing.co.uk>
Fri, 12 Jan 2024 12:23:34 +0000 (12:23 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 12 Jan 2024 12:23:34 +0000 (12:23 +0000)
src/tests/unit/condition/base.txt
src/tests/unit/condition/groups.txt
src/tests/unit/condition/regex.ignore
src/tests/unit/protocols/bfd/base.txt
src/tests/unit/xlat/base.txt
src/tests/unit/xlat/cond_base.txt
src/tests/unit/xlat/cond_regex.txt

index 70aa7505e59f5db94201382c0a9e9f224807935a..58192ae4d38c85d6b2298517ded7deb95cbe1e15 100644 (file)
@@ -434,16 +434,16 @@ match (&Filter-Id == &Framed-IP-Address)
 condition (ipaddr)127.0.0.1 == &Filter-Id
 match (127.0.0.1 == &Filter-Id)
 
-condition &Tmp-uint64-0 == &request.Foo-Stuff-Bar
-match (&Tmp-uint64-0 == &request.Foo-Stuff-Bar)
+condition &Acct-Input-Octets64 == &request.Foo-Stuff-Bar
+match (&Acct-Input-Octets64 == &request.Foo-Stuff-Bar)
 
-condition &Tmp-uint64-0 == &reply.Foo-Stuff-Bar
-match (&Tmp-uint64-0 == &reply.Foo-Stuff-Bar)
+condition &Acct-Input-Octets64 == &reply.Foo-Stuff-Bar
+match (&Acct-Input-Octets64 == &reply.Foo-Stuff-Bar)
 
 #
 #  Casting attributes of different size
 #
-condition (ipaddr)&Tmp-uint64-0 == &Framed-IP-Address
+condition (ipaddr)&Acct-Input-Octets64 == &Framed-IP-Address
 match ERROR offset 9: Cannot cast type 'uint64' to 'ipaddr'
 
 #
@@ -455,8 +455,8 @@ condition (ipaddr)&PMIP6-Home-IPv4-HoA == &Framed-IP-Address
 match ((ipaddr)&PMIP6-Home-IPv4-HoA == &Framed-IP-Address)
 
 # but these are allowed
-condition (ether)&Tmp-uint64-0 == "%interpreter('foo')"
-match ((ether)&Tmp-uint64-0 == %cast(string, "%interpreter('foo')"))
+condition (ether)&Acct-Input-Octets64 == "%interpreter('foo')"
+match ((ether)&Acct-Input-Octets64 == %cast(string, "%interpreter('foo')"))
 
 condition (ipaddr)&Filter-Id == &Framed-IP-Address
 match ((ipaddr)&Filter-Id == &Framed-IP-Address)
index 46181f5057e85b033b8ff4d7e761aa7d96ab1161..1e878f74ebf4cbaff7d84413e3c140f33d927285 100644 (file)
@@ -8,8 +8,8 @@
 proto-dictionary dhcpv6
 tmpl-rules allow_unresolved=no allow_unknown=no
 
-condition &IA-NA.Options.Tmp-String-0 == 'foo'
-match (&IA-NA.Options.Tmp-String-0 == 'foo')
+condition &IA-NA.Options.Stripped-User-Name == 'foo'
+match (&IA-NA.Options.Stripped-User-Name == 'foo')
 
 # Seen in the wild.  Array subscript on child produced an error
 condition &IA-NA.Options.IA-Addr[0].IPv6-Address == ::
index af66949302636fba413469da1756345e09ea877f..e19df078b6f982c3b6436483b1e37144b58fa644 100644 (file)
@@ -62,16 +62,16 @@ match &User-Name =~ /^([^\\]*)\\(.*)$/
 #
 #  Non-integer types get cast to string.
 #
-condition &Tmp-Integer-0 =~ /%{Tmp-Integer-0}/
-match <string>&Tmp-Integer-0 =~ /%{Tmp-Integer-0}/
+condition &NAS-Port =~ /%{NAS-Port}/
+match <string>&NAS-Port =~ /%{NAS-Port}/
 
 #
 #  Cannot add a bad cast
 #
-condition <integer>&Tmp-String-0 =~ /foo/
+condition <integer>&Filter-Id =~ /foo/
 match ERROR offset 10: Casts cannot be used with regular expressions
 
-condition &Tmp-String-0 =~ <integer>/foo/
+condition &Filter-Id =~ <integer>/foo/
 match ERROR offset 28: Casts cannot be used with regular expressions
 
 
index 2e17177f49d1c482623f1d3bff720936dea86f3a..23ad47eeca3e56a841872b13c7f86b74b1e226c9 100644 (file)
@@ -21,11 +21,11 @@ match Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, p
 #
 #  The BFD packet is exactly the same, but we also have a 3 octet string "foo", which is encoded via the internal dictionary, after the packet.
 #
-encode-proto Packet = { version = 1, diagnostic = none, state = up, poll = false, final = false, control-plane-independent = false, auth-present = false, demand = false, multipoint = false, detect-multi = 3, my-discriminator = 0xdeadbeef, your-discriminator = 0x21126809, desired-min-tx-interval = 31us, required-min-tx-interval = 127us, required-min-echo-interval   = 255us }, Additional-Data = { Tmp-String-0 = "foo" }
-match 20 c0 03 18 de ad be ef 21 12 68 09 00 00 00 1f 00 00 00 7f 00 00 00 ff 21 40 06 ae 03 66 6f 6f
+encode-proto Packet = { version = 1, diagnostic = none, state = up, poll = false, final = false, control-plane-independent = false, auth-present = false, demand = false, multipoint = false, detect-multi = 3, my-discriminator = 0xdeadbeef, your-discriminator = 0x21126809, desired-min-tx-interval = 31us, required-min-tx-interval = 127us, required-min-echo-interval   = 255us }, Additional-Data = { Stripped-User-Name = "foo" }
+match 20 c0 03 18 de ad be ef 21 12 68 09 00 00 00 1f 00 00 00 7f 00 00 00 ff 21 40 03 e8 03 66 6f 6f
 
 decode-proto -
-match Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, poll = no, final = no, control-plane-independent = no, auth-present = no, demand = no, multipoint = no, detect-multi = 3, length = 24, my-discriminator = 3735928559, your-discriminator = 554854409, desired-min-tx-interval = 31, required-min-tx-interval = 127, required-min-echo-interval = 255 }, Additional-Data = { Tmp-String-0 = "foo" }
+match Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, poll = no, final = no, control-plane-independent = no, auth-present = no, demand = no, multipoint = no, detect-multi = 3, length = 24, my-discriminator = 3735928559, your-discriminator = 554854409, desired-min-tx-interval = 31, required-min-tx-interval = 127, required-min-echo-interval = 255 }, Additional-Data = { Stripped-User-Name = "foo" }
 
 count
 match 11
index 5d22b7585fb87417ce6b6db1072543e0a807985e..2255a0b38d7cad71e34af20ff413e8377bba0dc1 100644 (file)
@@ -238,8 +238,8 @@ xlat_argv /bin/sh "foo bar" "%{User-Name} %{Filter-Id"
 match ERROR offset 44: Unexpected text after enum value.  Expected operator
 
 # and text immediately after a variable expansion
-xlat_argv echo hello %{Tmp-String-0}:1234 world
-match [0]{ echo }, [1]{ hello }, [2]{ %{Tmp-String-0}:1234 }, [3]{ world }
+xlat_argv echo hello %{Filter-Id}:1234 world
+match [0]{ echo }, [1]{ hello }, [2]{ %{Filter-Id}:1234 }, [3]{ world }
 
 xlat %debug(5)
 match %debug(5)
index 272087213cbdd8d9256ba38c23b5e3d8b3c50259..c7b3081dad0fcff6a559a14666381e375d359617 100644 (file)
@@ -441,16 +441,16 @@ match (&Filter-Id == &Framed-IP-Address)
 xlat_purify (ipaddr)127.0.0.1 == &Filter-Id
 match (127.0.0.1 == &Filter-Id)
 
-xlat_purify &Tmp-uint64-0 == &request.Tmp-String-0
-match (&Tmp-uint64-0 == &request.Tmp-String-0)
+xlat_purify &Acct-Input-Octets64 == &request.Callback-Id
+match (&Acct-Input-Octets64 == &request.Callback-Id)
 
-xlat_purify &Tmp-uint64-0 == &reply.Tmp-String-0
-match (&Tmp-uint64-0 == &reply.Tmp-String-0)
+xlat_purify &Acct-Input-Octets64 == &reply.Callback-Id
+match (&Acct-Input-Octets64 == &reply.Callback-Id)
 
 #
 #  Casting attributes of different size
 #
-xlat_purify (ipaddr)&Tmp-uint64-0 == &Framed-IP-Address
+xlat_purify (ipaddr)&Acct-Input-Octets64 == &Framed-IP-Address
 match ERROR offset 9: Cannot cast type 'uint64' to 'ipaddr'
 
 #
@@ -462,8 +462,8 @@ xlat_purify (ipaddr)&PMIP6-Home-IPv4-HoA == &Framed-IP-Address
 match ((ipaddr)&PMIP6-Home-IPv4-HoA == &Framed-IP-Address)
 
 # but these are allowed
-xlat_purify (ether)&Tmp-uint64-0 == "%interpreter('foo')"
-match  ((ether)&Tmp-uint64-0 == %cast(string, "%interpreter('foo')"))
+xlat_purify (ether)&Acct-Input-Octets64 == "%interpreter('foo')"
+match  ((ether)&Acct-Input-Octets64 == %cast(string, "%interpreter('foo')"))
 
 xlat_purify (ipaddr)&Filter-Id == &Framed-IP-Address
 match ((ipaddr)&Filter-Id == &Framed-IP-Address)
@@ -498,8 +498,8 @@ xlat_purify &Acct-Input-Octets > &Session-Timeout
 match (&Acct-Input-Octets > &Session-Timeout)
 
 #  Separate types aren't optimized
-xlat_purify &Tmp-uint64-0 > &Session-Timeout
-match (&Tmp-uint64-0 > &Session-Timeout)
+xlat_purify &Acct-Input-Octets64 > &Session-Timeout
+match (&Acct-Input-Octets64 > &Session-Timeout)
 
 #
 #  Parse OIDs into known attributes, where possible.
index 03d08dee8d4a74c561a4e81e2b666641ac2048bd..64ca851a305af1d6b451abf11331c0c40c4349ae 100644 (file)
@@ -53,18 +53,18 @@ match (&User-Name =~ /@|\\/)
 xlat_purify &User-Name =~ /^([^\\]*)\\(.*)$/
 match (&User-Name =~ /^([^\\]*)\\(.*)$/)
 
-xlat_purify &Tmp-Integer-0 =~ /%{Tmp-Integer-1} foo/
-match (&Tmp-Integer-0 =~ /%{Tmp-Integer-1} foo/)
+xlat_purify &NAS-Port =~ /%{Login-TCP-Port} foo/
+match (&NAS-Port =~ /%{Login-TCP-Port} foo/)
 
 #
 #  If they're dumb enough to add a cast, then it will be just cast again
 #  to "string" before the regular expression is evaluated.
 #
-xlat_purify (integer)&Tmp-String-0 =~ /foo/
-match ((uint32)&Tmp-String-0 =~ /foo/)
+xlat_purify (integer)&Filter-Id =~ /foo/
+match ((uint32)&Filter-Id =~ /foo/)
 
-xlat_purify &Tmp-String-0 =~ <integer>/foo/
-match ERROR offset 18: Expected regular expression
+xlat_purify &Filter-Id =~ <integer>/foo/
+match ERROR offset 15: Expected regular expression
 
 xlat_expr %{33}
 match ERROR offset 3: Invalid regex reference.  Must be in range 0-32