Add ttcn3-hnbgw-test docker container

Only works in OSMO_HNBGW_BRANCH=pmaier/mgw2 for now

Change-Id: I7e06c1d4365a34b8b6b02a4748714694dfa14554
This commit is contained in:
Daniel Willmann 2022-02-17 19:27:58 +01:00
parent 461a858c0a
commit f8847e202a
6 changed files with 218 additions and 0 deletions

View File

@ -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" hnbgw
VOLUME /data
COPY HNBGW_Tests.cfg /data/HNBGW_Tests.cfg
CMD ttcn3-docker-run hnbgw HNBGW_Tests

View File

@ -0,0 +1,46 @@
[ORDERED_INCLUDE]
# Common configuration, shared between test suites
"/osmo-ttcn3-hacks/Common.cfg"
# testsuite specific configuration, not expected to change
"/osmo-ttcn3-hacks/hnbgw/HNBGW_Tests.default"
# Local configuration below
[LOGGING]
[TESTPORT_PARAMETERS]
*.HNBGWVTY.CTRL_HOSTNAME := "172.18.35.20"
[MODULE_PARAMETERS]
HNBGW_Tests.mp_hnodeb_ip := "172.18.35.203";
HNBGW_Tests.mp_hnbgw_ip := "172.18.35.20";
HNBGW_Tests.mp_mgw_ip := "172.18.35.203";
HNBGW_Tests.mp_msc_cfg := {
transport := RANAP_TRANSPORT_IuCS,
sccp_service_type := "mtp3_itu",
sctp_addr := { 23905, "172.18.35.203", 2905, "172.18.35.200" },
own_pc := 188, /* 0.23.4 first MSC emulation */
own_ssn := 142,
peer_pc := 189, /* 0.23.5 osmo-hnbgw */
peer_ssn := 142,
sio := '83'O,
rctx := 1
};
HNBGW_Tests.mp_sgsn_cfg := {
transport := RANAP_TRANSPORT_IuCS,
sccp_service_type := "mtp3_itu",
sctp_addr := { 23906, "172.18.35.203", 2905, "172.18.35.200" },
own_pc := 185, /* 0.23.1 first SGSN emulation */
own_ssn := 142,
peer_pc := 189, /* 0.23.5 osmo-hnbgw */
peer_ssn := 142,
sio := '83'O,
rctx := 2
};
[MAIN_CONTROLLER]
[EXECUTE]
HNBGW_Tests.control

View File

@ -0,0 +1,3 @@
RUN_ARGS?=-it --sysctl net.ipv6.conf.all.disable_ipv6=0 --network sigtran --ip 172.18.35.203 -v ggsn-test-vol:/data
include ../make/Makefile

62
ttcn3-hnbgw-test/jenkins.sh Executable file
View File

@ -0,0 +1,62 @@
#!/bin/sh
. ../jenkins-common.sh
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
docker_images_require \
"osmo-stp-$IMAGE_SUFFIX" \
"osmo-hnbgw-$IMAGE_SUFFIX" \
"ttcn3-hnbgw-test"
set_clean_up_trap
set -e
mkdir $VOL_BASE_DIR/hnbgw-tester
mkdir $VOL_BASE_DIR/hnbgw-tester/unix
cp HNBGW_Tests.cfg $VOL_BASE_DIR/hnbgw-tester/
write_mp_osmo_repo "$VOL_BASE_DIR/hnbgw-tester/HNBGW_Tests.cfg"
mkdir $VOL_BASE_DIR/stp
cp osmo-stp.cfg $VOL_BASE_DIR/stp/
mkdir $VOL_BASE_DIR/hnbgw
mkdir $VOL_BASE_DIR/hnbgw/unix
cp osmo-hnbgw.cfg $VOL_BASE_DIR/hnbgw/
mkdir $VOL_BASE_DIR/unix
SUBNET=35
network_create $SUBNET
echo Starting container with STP
docker run --rm \
$(docker_network_params $SUBNET 200) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp -d \
$DOCKER_ARGS \
$REPO_USER/osmo-stp-$IMAGE_SUFFIX
echo Starting container with HNBGW
docker run --rm \
$(docker_network_params $SUBNET 20) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/hnbgw:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-hnbgw -d \
$DOCKER_ARGS \
$REPO_USER/osmo-hnbgw-$IMAGE_SUFFIX
echo Starting container with HNBGW testsuite
docker run --rm \
$(docker_network_params $SUBNET 203) \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/hnbgw-tester:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-ttcn3-hnbgw-test \
$DOCKER_ARGS \
$REPO_USER/ttcn3-hnbgw-test
echo Stopping containers
docker container kill ${BUILD_TAG}-hnbgw
docker container kill ${BUILD_TAG}-stp

View File

@ -0,0 +1,42 @@
!
! OsmoHNBGW (1.1.0) configuration saved from vty
!!
!
log stderr
logging filter all 1
logging color 1
logging print category-hex 1
logging print category 1
logging print thread-id 0
logging print extended-timestamp 1
logging print file 1
logging level set-all debug
!
line vty
no login
bind 0.0.0.0
!
cs7 instance 0
asp asp-clnt-msc-0 2905 2905 m3ua
local-ip 172.18.35.20
remote-ip 172.18.35.200
point-code 0.23.5
sccp-address msc
routing-indicator PC
point-code 0.23.4
sccp-address sgsn
routing-indicator PC
point-code 0.23.1
hnbgw
log-prefix hnb-id
iuh
local-ip 172.18.35.20
local-port 29169
hnbap-allow-tmsi 1
iucs
remote-addr msc
iups
remote-addr sgsn
mgcp
mgw local-ip 172.18.35.20
mgw remote-ip 172.18.35.203

View File

@ -0,0 +1,52 @@
!
! OsmoSTP (0.8.1) configuration saved from vty
!!
!
log stderr
logging filter all 1
logging color 1
logging print category 1
logging timestamp 1
logging print extended-timestamp 1
logging level lglobal notice
logging level llapd notice
logging level linp notice
logging level lmux notice
logging level lmi notice
logging level lmib notice
logging level lsms notice
logging level lctrl notice
logging level lgtp notice
logging level lstats notice
logging level lgsup notice
logging level loap notice
logging level lss7 debug
logging level lsccp debug
logging level lsua debug
logging level lm3ua debug
logging level lmgcp notice
!
line vty
no login
!
cs7 instance 0
xua rkm routing-key-allocation dynamic-permitted
asp virt-msc0-0 23905 2905 m3ua
local-ip 172.18.35.200
remote-ip 172.18.35.203
as virt-msc0 m3ua
asp virt-msc0-0
routing-key 1 0.23.4
asp virt-sgsn0-0 23906 2905 m3ua
local-ip 172.18.35.200
remote-ip 172.18.35.203
as virt-sgsn0 m3ua
asp virt-sgsn0-0
routing-key 2 0.23.1
route-table system
update route 0.23.4 7.255.7 linkset virt-msc0
update route 0.23.1 7.255.7 linkset virt-sgsn0
listen m3ua 2905
accept-asp-connections dynamic-permitted