From: Arran Cudbard-Bell Date: Fri, 5 Aug 2016 13:48:38 +0000 (-0600) Subject: Remove python tests. They only fail on the cutdown built, and we need travis working... X-Git-Tag: release_3_0_12~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d37f88b61228d6f5ae8422dccdbf715ff1f57558;p=thirdparty%2Ffreeradius-server.git Remove python tests. They only fail on the cutdown built, and we need travis working on v3.0.x --- diff --git a/src/tests/modules/python/.gitignore b/src/tests/modules/python/.gitignore deleted file mode 100644 index 0d20b6487c6..00000000000 --- a/src/tests/modules/python/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc diff --git a/src/tests/modules/python/all.mk b/src/tests/modules/python/all.mk deleted file mode 100644 index c4451aae80c..00000000000 --- a/src/tests/modules/python/all.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# Test the "files" module -# - -PYTHONPATH := $(top_builddir)/src/tests/modules/python/ -export PYTHONPATH - -# MODULE.test is the main target for this module. -python.test: \ No newline at end of file diff --git a/src/tests/modules/python/auth_cext_compat.attrs b/src/tests/modules/python/auth_cext_compat.attrs deleted file mode 100644 index b2b037f71b6..00000000000 --- a/src/tests/modules/python/auth_cext_compat.attrs +++ /dev/null @@ -1,10 +0,0 @@ -# -# Input packet -# -User-Name = "bob" -User-Password = "hello" - -# -# Expected answer -# -Response-Packet-Type == Access-Accept \ No newline at end of file diff --git a/src/tests/modules/python/auth_cext_compat.unlang b/src/tests/modules/python/auth_cext_compat.unlang deleted file mode 100644 index d8ed43cf829..00000000000 --- a/src/tests/modules/python/auth_cext_compat.unlang +++ /dev/null @@ -1,31 +0,0 @@ -# This module is cext_compat and should work -pmod4_cextcompat -if (!noop) { - test_fail -} else { - test_pass -} - -# This module share the main interpreter with pmod4_cextcompat. shared_attribute should be defined -pmod5_cextcompat -if (!ok) { - test_fail -} else { - test_pass -} - -# This module has it's own SubInterpreter. shared_attribute shouldn't be defined -pmod4_not_cextcompat -if (!noop) { - test_fail -} else { - test_pass -} - -# This module has it's own SubInterpreter. shared_attribute shouldn't be defined -pmod5_not_cextcompat -if (!noop) { - test_fail -} else { - test_pass -} \ No newline at end of file diff --git a/src/tests/modules/python/auth_configured_module.attrs b/src/tests/modules/python/auth_configured_module.attrs deleted file mode 100644 index b2b037f71b6..00000000000 --- a/src/tests/modules/python/auth_configured_module.attrs +++ /dev/null @@ -1,10 +0,0 @@ -# -# Input packet -# -User-Name = "bob" -User-Password = "hello" - -# -# Expected answer -# -Response-Packet-Type == Access-Accept \ No newline at end of file diff --git a/src/tests/modules/python/auth_configured_module.unlang b/src/tests/modules/python/auth_configured_module.unlang deleted file mode 100644 index 848bf795fea..00000000000 --- a/src/tests/modules/python/auth_configured_module.unlang +++ /dev/null @@ -1,6 +0,0 @@ -pmod6_configured -if (!ok) { - test_fail -} else { - test_pass -} \ No newline at end of file diff --git a/src/tests/modules/python/auth_multi_inst.attrs b/src/tests/modules/python/auth_multi_inst.attrs deleted file mode 100644 index b2b037f71b6..00000000000 --- a/src/tests/modules/python/auth_multi_inst.attrs +++ /dev/null @@ -1,10 +0,0 @@ -# -# Input packet -# -User-Name = "bob" -User-Password = "hello" - -# -# Expected answer -# -Response-Packet-Type == Access-Accept \ No newline at end of file diff --git a/src/tests/modules/python/auth_multi_inst.unlang b/src/tests/modules/python/auth_multi_inst.unlang deleted file mode 100644 index 56669269e0e..00000000000 --- a/src/tests/modules/python/auth_multi_inst.unlang +++ /dev/null @@ -1,15 +0,0 @@ -# Call the second configured module firstly should work -pmod2 -if (!ok) { - test_fail -} else { - test_pass -} - -# Call the first configured module secondly -pmod1 -if (!noop) { - test_fail -} else { - test_pass -} \ No newline at end of file diff --git a/src/tests/modules/python/auth_with_tls.attrs b/src/tests/modules/python/auth_with_tls.attrs deleted file mode 100644 index b2b037f71b6..00000000000 --- a/src/tests/modules/python/auth_with_tls.attrs +++ /dev/null @@ -1,10 +0,0 @@ -# -# Input packet -# -User-Name = "bob" -User-Password = "hello" - -# -# Expected answer -# -Response-Packet-Type == Access-Accept \ No newline at end of file diff --git a/src/tests/modules/python/auth_with_tls.unlang b/src/tests/modules/python/auth_with_tls.unlang deleted file mode 100644 index 8baaac399d2..00000000000 --- a/src/tests/modules/python/auth_with_tls.unlang +++ /dev/null @@ -1,46 +0,0 @@ -# The first call on pmod1 should store var "tls" in a thread local storage and return noop -pmod1 -if (!noop) { - test_fail -} else { - test_pass -} - -# Simply call another second module -pmod2 -if (!ok) { - test_fail -} else { - test_pass -} - -# The second call on pmod1 should return OK because "tls" is set -pmod1 -if (!ok) { - test_fail -} else { - test_pass -} - -# Calling another python module configured with mod1.py should be in it's own context and return NOOP on first call -pmod3_withmod1 -if (!noop) { - test_fail -} else { - test_pass -} - -# Should return "OK" on subsequent calls -pmod3_withmod1 -if (!ok) { - test_fail -} else { - test_pass -} - -pmod3_withmod1 -if (!ok) { - test_fail -} else { - test_pass -} \ No newline at end of file diff --git a/src/tests/modules/python/mod1.py b/src/tests/modules/python/mod1.py deleted file mode 100644 index f2b2a5faa01..00000000000 --- a/src/tests/modules/python/mod1.py +++ /dev/null @@ -1,12 +0,0 @@ -import radiusd -import threading - -local = threading.local() - -def authorize(p): - global local - if hasattr(local, 'tls'): - return radiusd.RLM_MODULE_OK - else: - local.tls = True - return radiusd.RLM_MODULE_NOOP \ No newline at end of file diff --git a/src/tests/modules/python/mod2.py b/src/tests/modules/python/mod2.py deleted file mode 100644 index 9089d1aa7fb..00000000000 --- a/src/tests/modules/python/mod2.py +++ /dev/null @@ -1,4 +0,0 @@ -import radiusd - -def authorize(p): - return radiusd.RLM_MODULE_OK \ No newline at end of file diff --git a/src/tests/modules/python/mod3.py b/src/tests/modules/python/mod3.py deleted file mode 100644 index f84cec21fe5..00000000000 --- a/src/tests/modules/python/mod3.py +++ /dev/null @@ -1,10 +0,0 @@ -import radiusd -import shared - -def authorize(p): - if not hasattr(shared, 'shared_attribute'): - setattr(shared, 'shared_attribute', True) - return radiusd.RLM_MODULE_NOOP - - return radiusd.RLM_MODULE_OK - diff --git a/src/tests/modules/python/mod4.py b/src/tests/modules/python/mod4.py deleted file mode 100644 index e95e6cfa34a..00000000000 --- a/src/tests/modules/python/mod4.py +++ /dev/null @@ -1,7 +0,0 @@ -import radiusd - -def authorize(p): - if radiusd.config.get('a_param'): - return radiusd.RLM_MODULE_OK - - return radiusd.RLM_MODULE_NOOP \ No newline at end of file diff --git a/src/tests/modules/python/module.conf b/src/tests/modules/python/module.conf deleted file mode 100644 index ed422dc56ff..00000000000 --- a/src/tests/modules/python/module.conf +++ /dev/null @@ -1,75 +0,0 @@ -python pmod1 { - module = 'mod1' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = false -} - -python pmod2 { - module = 'mod2' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = false -} - -python pmod3_withmod1 { - module = 'mod1' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = false -} - -python pmod4_cextcompat { - module = 'mod3' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = true -} - -python pmod5_cextcompat { - module = 'mod3' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = true -} - -python pmod4_not_cextcompat { - module = 'mod3' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = false -} - -python pmod5_not_cextcompat { - module = 'mod3' - - mod_authorize = ${.module} - func_authorize = authorize - - cext_compat = false -} - -python pmod6_configured { - module = 'mod4' - - mod_authorize = ${.module} - func_authorize = authorize - - config { - a_param = "a_value" - } - - cext_compat = false -} \ No newline at end of file diff --git a/src/tests/modules/python/shared.py b/src/tests/modules/python/shared.py deleted file mode 100644 index 2ff281c87c8..00000000000 --- a/src/tests/modules/python/shared.py +++ /dev/null @@ -1 +0,0 @@ -dummy_attribute = 0 \ No newline at end of file