From da4c1b44d31036d36f9ff728501d2ea4a9433aec Mon Sep 17 00:00:00 2001
From: David Schmitz <schmitz@lrz.de>
Date: Tue, 4 Jun 2024 06:50:36 +0000
Subject: [PATCH] testing: update inst/testing/nemo1/

---
 inst/testing/nemo1/install_and_run_vsmd | 10 +++++++++-
 inst/testing/nemo1/mynemo-docker-dind   | 17 ++++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/inst/testing/nemo1/install_and_run_vsmd b/inst/testing/nemo1/install_and_run_vsmd
index 89f92f4a..482aa9ac 100755
--- a/inst/testing/nemo1/install_and_run_vsmd
+++ b/inst/testing/nemo1/install_and_run_vsmd
@@ -5,6 +5,9 @@ if [ ! -f /.nemo_vsmd_setuped ]; then
   set -e	
 
   apt-get -yyy install xtables-addons-dkms xtables-addons-common exabgp linux-headers-amd64
+
+  export PERL_MM_USE_DEFAULT=1
+
   perl -MCPAN -e 'install (Net::CIDR::Lite)'
   perl -MCPAN -e 'install (Text::CSV_XS)'
   mkdir -p /usr/share/xt_geoip
@@ -54,6 +57,11 @@ fi
 echo TODO: configure /services/etc/nemo/nemo.conf
 echo use ./bin/adm.py OR ./bin/nemo-vsmd
 
-exec ./bin/nemo-vsmd "$@"
+if [ "$1" = "--install_only" ]; then
+  echo "use ./bin/nemo-vsmd to run inside outer container"
+else	
+  exec ./bin/nemo-vsmd "$@"
+fi
+
 
 
diff --git a/inst/testing/nemo1/mynemo-docker-dind b/inst/testing/nemo1/mynemo-docker-dind
index ceaf5426..4fe05aae 100755
--- a/inst/testing/nemo1/mynemo-docker-dind
+++ b/inst/testing/nemo1/mynemo-docker-dind
@@ -317,7 +317,8 @@ elif [ "$1" = "--setup" -o "$1" = "--run-setup-inside" ]; then #arg
 
   echo "# inside debian-docker-in-docker container: run setup.sh :" 1>&2
   #(set -x; docker exec -ti "$docker_outer__container_name" bash -c 'export SSH_AUTH_SOCK="/ssh-auth-sock"; cd /nemo-all/nemo-docker && ./setup.sh --verbose "$@"' -- "$@")
-  (set -x; docker exec -ti "$docker_outer__container_name" bash -c 'export SSH_AUTH_SOCK="/ssh-auth-sock"; cd /nemo-all/nemo-docker && ./setup.sh "$@"' -- "$@")
+  #(set -x; docker exec -ti "$docker_outer__container_name" bash -c 'export SSH_AUTH_SOCK="/ssh-auth-sock"; cd /nemo-all/nemo-docker && ./setup.sh "$@"' -- "$@")
+  (set -x; docker exec -ti "$docker_outer__container_name" bash -c 'export SSH_AUTH_SOCK="/ssh-auth-sock"; export ADMIN_MAIL="test@localhost"; export ADMIN_NAME="test"; cd /nemo-all/nemo-docker && ./setup.sh "$@"' -- "$@")
   echo 1>&2
 
   #echo "# inside debian-docker-in-docker container: test access to UI via curl (assumes empty password for the client certificate):" 1>&2
@@ -539,6 +540,20 @@ elif [ "$1" = "--nemo-get-dirname-onhost" ]; then #arg # show dirname of inside
 
   echo "/proc/$(docker inspect "$docker_outer__container_name" | awk ' /"Pid":/ { sub(/,$/, ""); print $2; }')/root/nemo-all/"
 
+#arg
+
+elif [ "$1" = "--allx" ]; then #arg # all-in-one mode
+   shift 1
+
+   set -e 
+   set -x
+
+   "$0" --all1
+   "$0" --freertr-testnet-prep-and-run
+   "$0" --exec ./install_and_run_vsmd --install_only
+
+   "$0" --nemo-get-dirname-onhost
+   "$0" --nemo-get-filename-of-certfile 
 
 #arg
 
-- 
GitLab