Add ttcn3-bscnat-test docker image
Run the bscnat ttcn3 tests in docker. This uses the osmo-nitb-master image since osmo-bsc_nat is built there as well. Change-Id: Ibeebb0325d3d1976225666eb28db0741df2e66f0
This commit is contained in:
parent
f8edc56f3a
commit
6870d87345
|
@ -0,0 +1,30 @@
|
|||
[ORDERED_INCLUDE]
|
||||
"/osmo-ttcn3-hacks/Common.cfg"
|
||||
"/osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests.default"
|
||||
|
||||
[LOGGING]
|
||||
*.JUnitLogger.testsuite_name := "BSCNAT_Tests"
|
||||
|
||||
[TESTPORT_PARAMETERS]
|
||||
|
||||
[MODULE_PARAMETERS]
|
||||
mp_bsc_port := 49999;
|
||||
mp_bsc_ip := "172.18.11.203";
|
||||
mp_msc_port := 5100;
|
||||
mp_msc_ip := "172.18.11.203";
|
||||
mp_nat_port := 5000;
|
||||
mp_nat_ip := "172.18.11.20";
|
||||
|
||||
#mp_ipa_mgcp_uses_osmo_ext := true;
|
||||
|
||||
mp_mgcp_uses_udp := true;
|
||||
mp_callagent_ip := "172.18.11.203";
|
||||
mp_callagent_udp_port := 2727;
|
||||
mp_mgw_ip := "172.18.11.20";
|
||||
mp_mgw_udp_port := 2427;
|
||||
|
||||
[MAIN_CONTROLLER]
|
||||
|
||||
[EXECUTE]
|
||||
BSCNAT_Tests.control
|
||||
#BSCNAT_Tests.TC_recv_dump
|
|
@ -0,0 +1,33 @@
|
|||
ARG USER
|
||||
FROM $USER/debian-stretch-titan
|
||||
|
||||
RUN mkdir /root/projects && (cd /root/projects && ln -sf / git)
|
||||
RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
|
||||
|
||||
RUN cd osmo-ttcn3-hacks && \
|
||||
git checkout -f -B master origin/master && \
|
||||
make deps
|
||||
|
||||
RUN git config --global user.email docker@dock.er && \
|
||||
git config --global user.name "Dock Er"
|
||||
|
||||
ARG OSMO_TTCN3_BRANCH="master"
|
||||
|
||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||
RUN cd osmo-ttcn3-hacks && \
|
||||
git fetch && \
|
||||
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
|
||||
make bsc-nat
|
||||
|
||||
VOLUME /data
|
||||
|
||||
RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
|
||||
ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
|
||||
|
||||
COPY BSCNAT_Tests.cfg /data/BSCNAT_Tests.cfg
|
||||
|
||||
CMD cd /data && \
|
||||
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests; \
|
||||
exit_code=$?; \
|
||||
/osmo-ttcn3-hacks/log_merge.sh BSCNAT_Tests --rm; \
|
||||
exit $exit_code
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
include ../make/Makefile
|
|
@ -0,0 +1,19 @@
|
|||
nat
|
||||
bsc 0
|
||||
token BSC0
|
||||
location_area_code 1
|
||||
description bsc
|
||||
max-endpoints 32
|
||||
paging forbidden 0
|
||||
bsc 1
|
||||
token BSC1
|
||||
location_area_code 2
|
||||
description bsc
|
||||
max-endpoints 32
|
||||
paging forbidden 0
|
||||
bsc 2
|
||||
token BSC2
|
||||
location_area_code 3
|
||||
description bsc
|
||||
max-endpoints 32
|
||||
paging forbidden 0
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ../jenkins-common.sh
|
||||
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
|
||||
docker_images_require \
|
||||
"debian-jessie-build" \
|
||||
"osmo-nitb-$IMAGE_SUFFIX" \
|
||||
"debian-stretch-titan" \
|
||||
"ttcn3-bscnat-test"
|
||||
|
||||
|
||||
mkdir $VOL_BASE_DIR/bscnat-tester
|
||||
cp BSCNAT_Tests.cfg $VOL_BASE_DIR/bscnat-tester/
|
||||
|
||||
mkdir $VOL_BASE_DIR/bscnat
|
||||
cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/
|
||||
cp bscs.config $VOL_BASE_DIR/bscnat/
|
||||
|
||||
network_create 172.18.11.0/24
|
||||
|
||||
echo Starting container with BSCNAT
|
||||
docker run --rm \
|
||||
--network $NET_NAME --ip 172.18.11.20 \
|
||||
-v $VOL_BASE_DIR/bscnat:/data \
|
||||
--name ${BUILD_TAG}-bscnat -d \
|
||||
$REPO_USER/osmo-nitb-$IMAGE_SUFFIX /usr/local/bin/osmo-bsc_nat -c /data/osmo-bsc-nat.cfg
|
||||
|
||||
echo Starting container with BSCNAT testsuite
|
||||
docker run --rm \
|
||||
--network $NET_NAME --ip 172.18.11.203 \
|
||||
-e "TTCN3_PCAP_PATH=/data" \
|
||||
-v $VOL_BASE_DIR/bscnat-tester:/data \
|
||||
--name ${BUILD_TAG}-ttcn3-bscnat-test \
|
||||
$REPO_USER/ttcn3-bscnat-test
|
||||
|
||||
echo Stopping containers
|
||||
docker container kill ${BUILD_TAG}-bscnat
|
||||
|
||||
network_remove
|
||||
collect_logs
|
|
@ -0,0 +1,67 @@
|
|||
!
|
||||
! OsmoBSCNAT (0.12.0.266-2daa9) configuration saved from vty
|
||||
!!
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging timestamp 1
|
||||
logging level rll notice
|
||||
logging level cc notice
|
||||
logging level mm notice
|
||||
logging level rr notice
|
||||
logging level rsl notice
|
||||
logging level nm info
|
||||
logging level mncc notice
|
||||
logging level pag notice
|
||||
logging level meas notice
|
||||
logging level sccp debug
|
||||
logging level msc notice
|
||||
logging level mgcp notice
|
||||
logging level ho notice
|
||||
logging level db notice
|
||||
logging level ref notice
|
||||
logging level gprs debug
|
||||
logging level ns info
|
||||
logging level bssgp debug
|
||||
logging level llc debug
|
||||
logging level sndcp debug
|
||||
logging level nat notice
|
||||
logging level ctrl notice
|
||||
logging level smpp debug
|
||||
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
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
mgcp
|
||||
bind ip 172.18.11.20
|
||||
bind port 2427
|
||||
rtp bts-base 4000
|
||||
rtp net-base 16000
|
||||
rtp ip-dscp 0
|
||||
no rtcp-omit
|
||||
sdp audio-payload number 126
|
||||
sdp audio-payload name AMR/8000
|
||||
loop 0
|
||||
number endpoints 1
|
||||
call-agent ip 172.18.11.203
|
||||
rtp transcoder-base 0
|
||||
transcoder-remote-base 4000
|
||||
nat
|
||||
msc ip 172.18.11.203
|
||||
msc port 5100
|
||||
token foo
|
||||
timeout auth 2
|
||||
timeout ping 20
|
||||
timeout pong 5
|
||||
ip-dscp 0
|
||||
bscs-config-file bscs.config
|
||||
access-list msceven imsi-allow ^[0-9]*[24680]$
|
||||
access-list mscodd imsi-allow ^[0-9]*[13579]$
|
Loading…
Reference in New Issue