diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-10-11 14:36:33 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2023-10-15 21:48:13 +0000 |
commit | 0b97785ceb0d9c01f397255732a37c29673076dc (patch) | |
tree | adb9fcb6dc50b5b7fbd03447bad5f1e8c3107d63 | |
parent | 856b9f2d173bc7ae72c693557ec9cf761742f226 (diff) |
ttcn3-hss-test-ogs: Adapt mongodb db setup to pass new test
Add DB config for new subscriber required by TC_ulr_ula_subscr_op_det_barring_7.
Depends: osmo-ttcn3-hacks.git I8deea9e284447f8991bdeced982c14fae2f211c5
Related: SYS#6588
Change-Id: I42d6af42bada50c55914ec94c4090fccbe8d1c97
-rwxr-xr-x | ttcn3-hss-test-ogs/jenkins.sh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ttcn3-hss-test-ogs/jenkins.sh b/ttcn3-hss-test-ogs/jenkins.sh index 5ca59a9..0eacaf9 100755 --- a/ttcn3-hss-test-ogs/jenkins.sh +++ b/ttcn3-hss-test-ogs/jenkins.sh @@ -24,6 +24,9 @@ cp ogs/freediameter.conf $VOL_BASE_DIR/hss/ network_create network_replace_subnet_in_configs +MONGOD_ADDR="172.18.$SUBNET.103" +DBCTL="open5gs-dbctl --db_uri=mongodb://$MONGOD_ADDR/open5gs" + # start container with mongod in background docker run --rm --user $(id -u) \ $(docker_network_params $SUBNET 103) \ @@ -35,16 +38,22 @@ docker run --rm --user $(id -u) \ /bin/sh -c "mongod -f /data/mongod.conf >/data/mongod.out 2>&1" # mongod needs some time to bootstrap... -while ! nc -z 172.18.$SUBNET.103 27017; do sleep 1; done +while ! nc -z $MONGOD_ADDR 27017; do sleep 1; done # create a test subscriber with IMSI=001010000000000 docker run --rm \ $(docker_network_params $SUBNET 8) \ $REPO_USER/open5gs-$IMAGE_SUFFIX \ - open5gs-dbctl --db_uri=mongodb://172.18.$SUBNET.103/open5gs \ - add 001010000000000 \ - 3c6e0b8a9c15224a8228b9a98ca1531d \ - 762a2206fe0b4151ace403c86a11e479 + $DBCTL add 001010000000000 3c6e0b8a9c15224a8228b9a98ca1531d 762a2206fe0b4151ace403c86a11e479 + +# Mark test subscriber with IMSI=001010000000001 as: +# Subscriber-Status=OPERATOR_DETERMINED_BARRING (1) +# Operator-Determined-Barring="Barring of all outgoing inter-zonal calls except those directed to the home PLMN country" (7) +docker run --rm \ + $(docker_network_params $SUBNET 8) \ + $REPO_USER/open5gs-$IMAGE_SUFFIX \ + /bin/sh -c "$DBCTL add 001010000000001 3c6e0b8a9c15224a8228b9a98ca1531d 762a2206fe0b4151ace403c86a11e479 && + $DBCTL subscriber_status 001010000000001 1 7" # start container with hss in background docker run --sysctl net.ipv6.conf.all.disable_ipv6=0 \ |