Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ./test/scenes/scene-default/up.sh running failed, fix it #867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/scenes/common/status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
4 changes: 2 additions & 2 deletions test/scenes/common/utils.sh
Original file line number Diff line number Diff line change
@@ -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]; } }'
}
4 changes: 2 additions & 2 deletions test/scenes/scene-default/after.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading