justxuewei commented on code in PR #523:
URL: https://github.com/apache/dubbo-go-samples/pull/523#discussion_r1135235796


##########
start_integrate_test.sh:
##########
@@ -64,13 +64,17 @@ array+=("rpc/triple/msgpack")
 array+=("rpc/triple/pb/dubbogo-grpc")
 array+=("rpc/grpc")
 array+=("rpc/jsonrpc")
+array+=("rpc/triple/pb2")
 
 #tls
 array+=("tls/dubbo")
 array+=("tls/triple")
 array+=("tls/grpc")
 
 
+# replace tls config
+find $(pwd)/tls -type f -print0 | xargs -0 sed -i  
's#\.\.\/\.\.\/\.\.#'"$(pwd)/tls"'#g'

Review Comment:
   Furthermore, it would be better to print a message so that other users are 
aware of what we are doing.
   
   ```bash
   echo "The prefix of certificate path were replaced to "$(pwd)/tls/x509" for 
tls/dubbo/go-client/conf/dubbogo.yml, tls/dubbo/go-server/conf/dubbogo.yml, 
<others..>"
   ```
   
   In order to make it more convenient to maintain, you could create an array 
to contain those config paths. Eventually, it looks like this:
   
   ```bash
   tls_configs=("config path1" "config path2")
   for (( i=0; i<${#tls_configs[@]}; i++ ))
   do
     sed -i 's#../../../x509#'"$(pwd)/tls/x509"'#g' ${tls_configs[i]}
     echo "${tls_configs[i]}: The prefix of certificate path was replaced to 
\"$(pwd)/tls/x509\""
   done
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to