Prechádzať zdrojové kódy

more robust discovery log check

Alex Cheema 7 mesiacov pred
rodič
commit
3c0297c3e9
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      .github/workflows/build_and_test.yml

+ 4 - 1
.github/workflows/build_and_test.yml

@@ -100,7 +100,10 @@ jobs:
           PID2=$!
           PID2=$!
           sleep 10
           sleep 10
           kill $PID1 $PID2
           kill $PID1 $PID2
-          if grep -q "Peer statuses: {\\'node2\\': \\'is_connected=True, health_check=True" output1.log && ! grep -q "Failed to connect peers:" output1.log && grep -q "Peer statuses: {\\'node1\\': \\'is_connected=True, health_check=True" output2.log && ! grep -q "Failed to connect peers:" output2.log; then
+          if grep -q "Peer statuses: {.*'node2': 'is_connected=True, health_check=True" output1.log && \
+             ! grep -q "Failed to connect peers:" output1.log && \
+             grep -q "Peer statuses: {.*'node1': 'is_connected=True, health_check=True" output2.log && \
+             ! grep -q "Failed to connect peers:" output2.log; then
             echo "Test passed: Both instances discovered each other"
             echo "Test passed: Both instances discovered each other"
             exit 0
             exit 0
           else
           else