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