]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we no longer support update
authorAlan T. DeKok <aland@freeradius.org>
Tue, 19 Aug 2025 13:44:03 +0000 (09:44 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 19 Aug 2025 13:53:16 +0000 (09:53 -0400)
so we don't need tests for it.

And these tests were not "map" tests, but 'update" tests

src/tests/all.mk
src/tests/map/all.mk [deleted file]
src/tests/map/base [deleted file]
src/tests/map/base.log [deleted file]
src/tests/map/count-error [deleted file]
src/tests/map/count-list-error [deleted file]

index 5f1dd13fd47da5b8afcd561bb03971120046a237..b094ea854474781ee2957510621f04f91663f73a 100644 (file)
@@ -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 (file)
index 9fcdad8..0000000
+++ /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 (file)
index aba08dd..0000000
+++ /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 (file)
index 544d939..0000000
+++ /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 (file)
index f76ac1f..0000000
+++ /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 (file)
index d2fcc2e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-#      Updating lists isn't allowed
-#
-update {
-       request.Filter-Id := Filter-Id[#]       # ERROR
-}