From 4f2a17b8ec6c9486095378247fbc43c5a042ca7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=B0=B8=E8=A1=8C?= Date: Mon, 24 Jun 2024 20:39:41 +0800 Subject: [PATCH] =?UTF-8?q?test=E8=84=9A=E6=9C=AC=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E6=9C=89bug,=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/scenes/common/status.sh | 6 +++--- test/scenes/common/utils.sh | 4 ++-- test/scenes/scene-default/after.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/scenes/common/status.sh b/test/scenes/common/status.sh index c2824b9e7..473c6504e 100755 --- a/test/scenes/common/status.sh +++ b/test/scenes/common/status.sh @@ -13,10 +13,10 @@ echo "$ps" echo source=" Component\t Access - Server_UI\t http://$ip:`get_port server 80` - Server_JVM_Debugger\t $ip:`get_port server 8000` + Server_UI\t http://$ip:`get_port default-server 80` + Server_JVM_Debugger\t $ip:`get_port default-server 8000` Server_exec\t ./server-exec.sh - Server_Web_Shell\t http://$ip:`get_port server 7681` + Server_Web_Shell\t http://$ip:`get_port default-server 7681` Collector_SkyWalking\t $ip:`get_port collector 11800` Collector_DataDog\t $ip:`get_port collector 5001` MySQL\t $ip:`get_port mysql 3306` diff --git a/test/scenes/common/utils.sh b/test/scenes/common/utils.sh index f4639be3e..0d8c7afb7 100644 --- a/test/scenes/common/utils.sh +++ b/test/scenes/common/utils.sh @@ -1,10 +1,10 @@ function get_container() { local service=$1 - echo "$ps" | awk -v service=$service -e '{ if(index($1, sprintf("_%s_", service)) > 1) { print $1; } }' + echo "$ps" | awk -v service=$service '{ if(index($1, sprintf("%s", service)) > 1) { print $1; } }' } function get_port() { local service=$1 local port=$2 - echo "$ps" | awk -v service=$service -v port=$port -e '{ if(index($0, sprintf("_%s_", service)) > 1) { match($0, sprintf(":([0-9]+)->%d/", port), a); print a[1]; } }' + echo "$ps" | awk -v service=$service -v port=$port '{ if(index($0, sprintf("%s", service)) > 1) { match($0, sprintf(":([0-9]+)->%d/", port), a); print a[1]; } }' } diff --git a/test/scenes/scene-default/after.sh b/test/scenes/scene-default/after.sh index bba72103c..b3317fd01 100755 --- a/test/scenes/scene-default/after.sh +++ b/test/scenes/scene-default/after.sh @@ -13,9 +13,9 @@ fi export ps=`docker-compose ps` -server_container_name=`get_container server` +server_container_name=`get_container default-server` -echo [agent] install agent to server,demo-client,demo-server +echo [agent] install agent to default-server,demo-client,demo-server target=$server_container_name ../common/copy-agent.sh target=`get_container demo-client` ../common/copy-agent.sh target=`get_container demo-server` ../common/copy-agent.sh