From: Alan T. DeKok Date: Wed, 16 Nov 2022 18:43:55 +0000 (-0500) Subject: notes on what needs fixing for new "auto-convert to edit" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28afec8cab37310ef3a77353414aaf0a241b7a6a;p=thirdparty%2Ffreeradius-server.git notes on what needs fixing for new "auto-convert to edit" --- diff --git a/src/tests/keywords/update-attr-ref-null b/src/tests/keywords/update-attr-ref-null index 7bae6f40ccd..3df91574800 100644 --- a/src/tests/keywords/update-attr-ref-null +++ b/src/tests/keywords/update-attr-ref-null @@ -7,6 +7,11 @@ update request { &Tmp-String-0 += 'foo' &Tmp-String-0 += 'bar' &Tmp-String-1 += 'baz' + + # + # @fixme - EDIT - There's already a list! WTF is going on here? + # this should be forbidden! + # &control !* ANY } @@ -19,6 +24,9 @@ if (&Tmp-String-0[0] != 'foo') { } # Delete an attribute by assigning a non-existent attribute to it +# +# @fixme - EDIT - the new method is to simply omit the assignment +# update { &Tmp-String-0[1] := &Reply-Message } diff --git a/src/tests/keywords/update-error-3 b/src/tests/keywords/update-error-3 index b413b5657ee..7591e2ae117 100644 --- a/src/tests/keywords/update-error-3 +++ b/src/tests/keywords/update-error-3 @@ -4,6 +4,10 @@ # It's an error to assign literal values which are not # part of the set of enumerated values for an attribute # + +# +# @fixme - EDIT - this is now a run-time error +# update { &Service-Type := 'hello' # ERROR } diff --git a/src/tests/keywords/update-filter b/src/tests/keywords/update-filter index 5455fbe767a..fbf41659bc6 100644 --- a/src/tests/keywords/update-filter +++ b/src/tests/keywords/update-filter @@ -14,9 +14,18 @@ update control { # Reset the request list update { &request !* ANY + + # + # @fixme - EDIT - &control[*] isn't supported, and is ignored. It should likely + # be a compile-time error? + # &request += &control[*] } +# +# @fixme - EDIT - all kinds of other things are broken, and no time currently to debug them. +# + debug_request # diff --git a/src/tests/keywords/update-group-error b/src/tests/keywords/update-group-error index c76d11f0fac..5ca4cc11160 100644 --- a/src/tests/keywords/update-group-error +++ b/src/tests/keywords/update-group-error @@ -7,6 +7,8 @@ update reply { # # This is a string, so it's NOT allowed. # + # @fixme - EDIT - the error is now on the first line + # &Tmp-String-1 := { Tmp-String-2 := "1.0" # ERROR } diff --git a/src/tests/keywords/update-list-error b/src/tests/keywords/update-list-error index 5eb26ee7a41..0f96c421a0c 100644 --- a/src/tests/keywords/update-list-error +++ b/src/tests/keywords/update-list-error @@ -5,7 +5,7 @@ # update { &request := &reply - &config += &request + &control += &request &reply !* ANY } @@ -13,7 +13,9 @@ update { &reply += `/path/to/foo bar baz` } - +# +# @fixme - EDIT - this is now a run-time error :( +# update { &request := nope # ERROR } diff --git a/src/tests/keywords/update-list-null-rhs b/src/tests/keywords/update-list-null-rhs index 05f95525b15..ad0c56587b3 100644 --- a/src/tests/keywords/update-list-null-rhs +++ b/src/tests/keywords/update-list-null-rhs @@ -7,6 +7,10 @@ update request { &Tmp-String-0 += 'foo' &Tmp-String-0 += 'bar' &Tmp-String-1 += 'baz' + + # + # @fixme - EDIT - how the heck did this ever work? + # &control !* ANY } diff --git a/src/tests/keywords/update-null-value-assign b/src/tests/keywords/update-null-value-assign index 4647e6d7955..5e0f1780b19 100644 --- a/src/tests/keywords/update-null-value-assign +++ b/src/tests/keywords/update-null-value-assign @@ -16,6 +16,8 @@ if (&Tmp-Integer-0) { # # NULL valued strings get converted to empty length strings # +# @fixme - EDIT - the new method is to simply omit the assignment +# update request { &Tmp-String-0 := "%{Reply-Message}" } @@ -29,6 +31,8 @@ if (&Tmp-String-0 != '') { # # NULL valued octet strings get converted to zero length octets strings?! # +# @fixme - EDIT - the new method is to simply omit the assignment +# update request { &Tmp-Octets-0 := "%{Reply-Message}" } diff --git a/src/tests/keywords/update-remove-index b/src/tests/keywords/update-remove-index index 67748c12ce4..cb0386f8fea 100644 --- a/src/tests/keywords/update-remove-index +++ b/src/tests/keywords/update-remove-index @@ -14,6 +14,11 @@ update { debug_request +# +# @fixme - EDIT - we should not be allowed to remove by both +# index AND value. Or, we should... and the edit code needs +# to be updated. +# update request { &Tmp-IP-Address-0[3] -= 192.0.2.2 }