dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43534?usp=email )
Change subject: testenv: add alternate config to test JSON ESipa bindings ......................................................................
testenv: add alternate config to test JSON ESipa bindings
The testsuite normally tests the eIM using the ASN.1 ESipa bindings (generic). In order to be able to automatically test the JSON ESipa bindings as well, let's add a testenv configuration (esipa-json) to the testsuite.
Related SYS#8100
Change-Id: Ic5b16d14cc675335356cd25367d44c3f9744b186 --- A eim/eIM_Tests_esipa-json.cfg M eim/prepare.sh A eim/testenv_esipa-json.cfg R eim/testenv_generic.cfg 4 files changed, 46 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/43534/1
diff --git a/eim/eIM_Tests_esipa-json.cfg b/eim/eIM_Tests_esipa-json.cfg new file mode 100644 index 0000000..c1d4d46 --- /dev/null +++ b/eim/eIM_Tests_esipa-json.cfg @@ -0,0 +1,22 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./eIM_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] +system.HTTP_server_port.KEYFILE := "alttest.key" +system.HTTP_server_port.CERTIFICATEFILE := "alttest.crt" + +[MODULE_PARAMETERS] +eIM_Tests.mp_restop_path := "./restop.py" +eIM_Tests.mp_esipa_json := true; + +[MAIN_CONTROLLER] + +[EXECUTE] +eIM_Tests.control diff --git a/eim/prepare.sh b/eim/prepare.sh index 2ed06f0..4ad2b72 100755 --- a/eim/prepare.sh +++ b/eim/prepare.sh @@ -3,7 +3,17 @@ # Set mp_restop_path RESTOP="$TESTENV_SRC_DIR"/onomondo-eim/contrib/rest_api_usage_example/restop.py test -e "$RESTOP" -sed \ - -i \ - "s,^eIM_Tests.mp_restop_path := .*,eIM_Tests.mp_restop_path := "$RESTOP"," \ - eIM_Tests.cfg + +if [ -e eIM_Tests.cfg ]; then + sed \ + -i \ + "s,^eIM_Tests.mp_restop_path := .*,eIM_Tests.mp_restop_path := "$RESTOP"," \ + eIM_Tests.cfg +fi + +if [ -e eIM_Tests_esipa-json.cfg ]; then + sed \ + -i \ + "s,^eIM_Tests.mp_restop_path := .*,eIM_Tests.mp_restop_path := "$RESTOP"," \ + eIM_Tests_esipa-json.cfg +fi diff --git a/eim/testenv_esipa-json.cfg b/eim/testenv_esipa-json.cfg new file mode 100644 index 0000000..43b6d96 --- /dev/null +++ b/eim/testenv_esipa-json.cfg @@ -0,0 +1,10 @@ +[testsuite] +program=eIM_Tests +config=eIM_Tests_esipa-json.cfg +copy=../ipad/example_ca/pki/private/alttest.key ../ipad/example_ca/pki/issued/alttest.crt +prepare=prepare.sh + +[eim] +program=onomondo-eim -c "$TESTENV_INSTALL_DIR"/etc/osmocom/onomondo-eim.config -r "$TESTENV_INSTALL_DIR"/usr/lib/onomondo-eim -m ./mnesia_db -l debug +make=onomondo-eim +package=onomondo-eim diff --git a/eim/testenv.cfg b/eim/testenv_generic.cfg similarity index 100% rename from eim/testenv.cfg rename to eim/testenv_generic.cfg