Skip to content

Commit 3901c0e

Browse files
committed
chore: grep failed when in some special scenario
1 parent a3dfbf5 commit 3901c0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/agent.bats

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ setup() {
8585
SAMPLE_PID=$!
8686
sleep 2
8787

88-
check_port=$(cat register.port | grep -a 7888)
88+
info register.port: `cat register.port`
89+
check_port=$(cat register.port | grep -a -Z 7888)
90+
info check_port: `echo $check_port`
8991
[ "$check_port" != "" ]
9092

9193
kill -9 $SAMPLE_PID
@@ -101,7 +103,7 @@ setup() {
101103
[ -e './simple-agent_profile_listen_addr' ]
102104
host=$(cat ./simple-agent_profile_listen_addr)
103105

104-
check_port=$(cat register.port | grep $host)
106+
check_port=$(cat register.port | grep -a -Z $host)
105107
[ "$check_port" != "" ]
106108

107109
kill -9 $SAMPLE_PID

0 commit comments

Comments
 (0)