From: Alan T. DeKok Date: Tue, 19 Aug 2025 13:44:03 +0000 (-0400) Subject: we no longer support update X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=029b6246ca14081cc2bbd00a8f40ec169c2b11e2;p=thirdparty%2Ffreeradius-server.git we no longer support update so we don't need tests for it. And these tests were not "map" tests, but 'update" tests --- diff --git a/src/tests/all.mk b/src/tests/all.mk index 5f1dd13fd47..b094ea85447 100644 --- a/src/tests/all.mk +++ b/src/tests/all.mk @@ -51,7 +51,6 @@ test: \ test.unit \ test.keywords \ test.xlat \ - test.map \ test.modules \ test.radiusd-c \ test.radclient \ diff --git a/src/tests/map/all.mk b/src/tests/map/all.mk deleted file mode 100644 index 9fcdad8e91e..00000000000 --- a/src/tests/map/all.mk +++ /dev/null @@ -1,53 +0,0 @@ -# -# Unit tests for individual pieces of functionality. -# - -# -# Test name -# -TEST := test.map - -# -# The files are put here in order. Later tests need -# functionality from earlier test. -# -FILES := \ - base \ - count-error \ - count-list-error - -$(eval $(call TEST_BOOTSTRAP)) - -MAP_UNIT := $(TEST_BIN)/unit_test_map - -# -# Re-run the tests if the input file changes -# -$(OUTPUT)/%: $(DIR)/% $(TEST_BIN_DIR)/unit_test_map - @echo "MAP-TEST $(notdir $<)" - ${Q}if ! $(MAP_UNIT) -d $(top_srcdir)/raddb -D $(top_srcdir)/share/dictionary -r "$@" "$<" > "$@.log" 2>&1 || ! test -f "$@"; then \ - if ! grep ERROR $< 2>&1 > /dev/null; then \ - cat "$@.log"; \ - echo "# $@"; \ - echo FAILED: "$(MAP_UNIT) -d $(top_srcdir)/raddb -D $(top_srcdir)/share/dictionary -r \"$@\" \"$<\""; \ - exit 1; \ - fi; \ - FOUND=$$(grep -E '^(Error : )?$<' $@.log | head -1 | sed 's/.*\[//;s/\].*//'); \ - EXPECTED=$$(grep -n ERROR $< | sed 's/:.*//'); \ - if [ "$$EXPECTED" != "$$FOUND" ]; then \ - cat "$@.log"; \ - echo "# $@"; \ - echo "E $$EXPECTED F $$FOUND"; \ - echo "UNEXPECTED ERROR: $(MAP_UNIT) -d $(top_srcdir)/raddb -D $(top_srcdir)/share/dictionary -r \"$@\" \"$<\""; \ - exit 1; \ - else \ - touch "$@"; \ - fi \ - else \ - sed -i.bak -e '$${/Executing: /d;}' "$@.log"; \ - if ! diff "$<.log" "$@.log"; then \ - echo "FAILED: diff \"$<.log\" \"$@.log\""; \ - echo "FAILED: $(MAP_UNIT) -d $(top_srcdir)/raddb -D $(top_srcdir)/share/dictionary -r \"$@\" \"$<\""; \ - exit 1; \ - fi; \ - fi diff --git a/src/tests/map/base b/src/tests/map/base deleted file mode 100644 index aba08dd73d2..00000000000 --- a/src/tests/map/base +++ /dev/null @@ -1,6 +0,0 @@ -update request { - Filter-Id[*] := "filter" - User-Name[*] := "blah" - - reply.Filter-Id[*] += request.Filter-Id[*] -} diff --git a/src/tests/map/base.log b/src/tests/map/base.log deleted file mode 100644 index 544d939fba3..00000000000 --- a/src/tests/map/base.log +++ /dev/null @@ -1,5 +0,0 @@ -update request { - Filter-Id[*] := "filter" - User-Name[*] := "blah" - reply.Filter-Id[*] += Filter-Id[*] -} diff --git a/src/tests/map/count-error b/src/tests/map/count-error deleted file mode 100644 index f76ac1f6eb1..00000000000 --- a/src/tests/map/count-error +++ /dev/null @@ -1,6 +0,0 @@ -# -# This should be an xlat, not a direct assignment -# -update request { - NAS-Port := Filter-Id[#] # ERROR -} diff --git a/src/tests/map/count-list-error b/src/tests/map/count-list-error deleted file mode 100644 index d2fcc2e11a7..00000000000 --- a/src/tests/map/count-list-error +++ /dev/null @@ -1,6 +0,0 @@ -# -# Updating lists isn't allowed -# -update { - request.Filter-Id := Filter-Id[#] # ERROR -}