diff --git a/ttcn3-upf-test/Dockerfile b/ttcn3-upf-test/Dockerfile new file mode 100644 index 00000000..addc43f8 --- /dev/null +++ b/ttcn3-upf-test/Dockerfile @@ -0,0 +1,13 @@ +ARG REGISTRY +ARG USER +FROM $REGISTRY/$USER/debian-bullseye-titan +ARG OSMO_TTCN3_BRANCH="master" + +ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit +RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" upf + +VOLUME /data + +COPY UPF_Tests.cfg /data/UPF_Tests.cfg + +CMD ttcn3-docker-run upf UPF_Tests diff --git a/ttcn3-upf-test/Makefile b/ttcn3-upf-test/Makefile new file mode 100644 index 00000000..207d0f19 --- /dev/null +++ b/ttcn3-upf-test/Makefile @@ -0,0 +1,3 @@ +RUN_ARGS?=-it --sysctl net.ipv6.conf.all.disable_ipv6=0 --network sigtran --ip 172.18.34.202 + +include ../make/Makefile diff --git a/ttcn3-upf-test/UPF_Tests.cfg b/ttcn3-upf-test/UPF_Tests.cfg new file mode 100644 index 00000000..0b794e7b --- /dev/null +++ b/ttcn3-upf-test/UPF_Tests.cfg @@ -0,0 +1,25 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/upf/UPF_Tests.default" + +[LOGGING] +*.JUnitLogger.testsuite_name := "UPF_Tests" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] +*.UPFVTY.CTRL_HOSTNAME := "172.18.34.20"; +*.STATSVTY.CTRL_HOSTNAME := "172.18.34.20"; + +[MODULE_PARAMETERS] +UPF_Tests.mp_pfcp_ip_upf := "172.18.34.20"; +UPF_Tests.mp_pfcp_ip_local := "172.18.34.203"; + +UPF_Tests.mp_verify_gtp_actions := false; + +[MAIN_CONTROLLER] + +[EXECUTE] +UPF_Tests.control diff --git a/ttcn3-upf-test/jenkins.sh b/ttcn3-upf-test/jenkins.sh new file mode 100755 index 00000000..2fb6d433 --- /dev/null +++ b/ttcn3-upf-test/jenkins.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "osmo-upf-$IMAGE_SUFFIX" \ + "ttcn3-upf-test" + +set_clean_up_trap +set -e + +mkdir $VOL_BASE_DIR/upf-tester +cp UPF_Tests.cfg $VOL_BASE_DIR/upf-tester/ +write_mp_osmo_repo "$VOL_BASE_DIR/upf-tester/UPF_Tests.cfg" + +mkdir $VOL_BASE_DIR/upf +cp osmo-upf.cfg $VOL_BASE_DIR/upf/ + +SUBNET=34 +network_create $SUBNET + +echo Starting container with UPF +docker run --rm \ + $(docker_network_params $SUBNET 20) \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/upf:/data \ + --name ${BUILD_TAG}-upf -d \ + $DOCKER_ARGS \ + $REPO_USER/osmo-upf-$IMAGE_SUFFIX + +echo Starting container with UPF testsuite +docker run --rm \ + $(docker_network_params $SUBNET 203) \ + --ulimit core=-1 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/upf-tester:/data \ + --name ${BUILD_TAG}-ttcn3-upf-test \ + $DOCKER_ARGS \ + $REPO_USER/ttcn3-upf-test diff --git a/ttcn3-upf-test/osmo-upf.cfg b/ttcn3-upf-test/osmo-upf.cfg new file mode 100644 index 00000000..39aaeb73 --- /dev/null +++ b/ttcn3-upf-test/osmo-upf.cfg @@ -0,0 +1,24 @@ +log stderr + logging filter all 1 + logging color 1 + logging print category-hex 0 + logging print category 1 + logging print thread-id 0 + logging print extended-timestamp 1 + logging print level 1 + logging print file basename last + logging level set-all debug +log gsmtap 172.18.34.203 + logging level set-all debug + logging filter all 1 +line vty + no login + bind 0.0.0.0 +ctrl + bind 0.0.0.0 +pfcp + local-addr 172.18.34.20 +gtp + mockup +nft + mockup