neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/docker-playground/+/29445 )
Change subject: add ttcn3-upf-test
......................................................................
add ttcn3-upf-test
Related: I43cd55c9395f2c706369afe1a9a7f475be47339f (osmo-ci)
Related: I5964979b3db86268f6011df0afbee7131557f405 (osmo-ci)
Change-Id: I7a651bb85861de4b2677a731b9f17fa0d790c621
---
A ttcn3-upf-test/Dockerfile
A ttcn3-upf-test/Makefile
A ttcn3-upf-test/UPF_Tests.cfg
A ttcn3-upf-test/jenkins.sh
A ttcn3-upf-test/osmo-upf.cfg
5 files changed, 104 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/45/29445/1
diff --git a/ttcn3-upf-test/Dockerfile b/ttcn3-upf-test/Dockerfile
new file mode 100644
index 0000000..addc43f
--- /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 0000000..207d0f1
--- /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 0000000..0b794e7
--- /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 0000000..2fb6d43
--- /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 0000000..39aaeb7
--- /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
--
To view, visit
https://gerrit.osmocom.org/c/docker-playground/+/29445
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I7a651bb85861de4b2677a731b9f17fa0d790c621
Gerrit-Change-Number: 29445
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange