diff options
Diffstat (limited to '')
-rw-r--r-- | src/tests/modules/preprocess/all.mk | 3 | ||||
-rw-r--r-- | src/tests/modules/preprocess/hints | 2 | ||||
-rw-r--r-- | src/tests/modules/preprocess/huntgroups | 0 | ||||
-rw-r--r-- | src/tests/modules/preprocess/module.conf | 4 | ||||
-rw-r--r-- | src/tests/modules/preprocess/xlat.attrs | 12 | ||||
-rw-r--r-- | src/tests/modules/preprocess/xlat.unlang | 14 |
6 files changed, 35 insertions, 0 deletions
diff --git a/src/tests/modules/preprocess/all.mk b/src/tests/modules/preprocess/all.mk new file mode 100644 index 0000000..5cfad60 --- /dev/null +++ b/src/tests/modules/preprocess/all.mk @@ -0,0 +1,3 @@ +# +# Test the "preprocess" module +# diff --git a/src/tests/modules/preprocess/hints b/src/tests/modules/preprocess/hints new file mode 100644 index 0000000..14ceafc --- /dev/null +++ b/src/tests/modules/preprocess/hints @@ -0,0 +1,2 @@ +DEFAULT + Calling-Station-Id := "%{User-Name}@%{NAS-IP-Address}" diff --git a/src/tests/modules/preprocess/huntgroups b/src/tests/modules/preprocess/huntgroups new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/tests/modules/preprocess/huntgroups diff --git a/src/tests/modules/preprocess/module.conf b/src/tests/modules/preprocess/module.conf new file mode 100644 index 0000000..7c51fa6 --- /dev/null +++ b/src/tests/modules/preprocess/module.conf @@ -0,0 +1,4 @@ +preprocess { + hints = $ENV{MODULE_TEST_DIR}/hints + huntgroups = $ENV{MODULE_TEST_DIR}/huntgroups +} diff --git a/src/tests/modules/preprocess/xlat.attrs b/src/tests/modules/preprocess/xlat.attrs new file mode 100644 index 0000000..e7170d1 --- /dev/null +++ b/src/tests/modules/preprocess/xlat.attrs @@ -0,0 +1,12 @@ +# +# Input packet +# +User-Name = "bob" +User-Password = "bob" +NAS-IP-Address = 127.0.0.1 + +# +# Expected answer +# +Response-Packet-Type == Access-Accept +Filter-Id == 'success' diff --git a/src/tests/modules/preprocess/xlat.unlang b/src/tests/modules/preprocess/xlat.unlang new file mode 100644 index 0000000..da53982 --- /dev/null +++ b/src/tests/modules/preprocess/xlat.unlang @@ -0,0 +1,14 @@ +# +# Run the preprocess module +# +preprocess + +if (Calling-Station-Id == "bob@127.0.0.1") { + update reply { + Filter-Id := "success" + } +} + +update control { + Cleartext-Password := "%{User-Name}" +} |