github.com/pion/webrtc/v4@v4.0.1/examples/pion-to-pion/test.sh (about)

     1  #!/bin/bash -eu
     2  
     3  # SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
     4  # SPDX-License-Identifier: MIT
     5  
     6  docker compose up -d
     7  
     8  function on_exit {
     9    docker compose logs
    10    docker compose rm -fsv
    11  }
    12  
    13  trap on_exit EXIT
    14  
    15  TIMEOUT=10
    16  timeout $TIMEOUT docker compose logs -f | grep -q "answer  | Message from DataChannel"
    17  timeout $TIMEOUT docker compose logs -f | grep -q "offer   | Message from DataChannel"