Commit b8ccc35c authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI component:

- Fixing unit test issue
parent c0f36096
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -103,7 +103,13 @@ unit_test nbi:
      --env IETF_NETWORK_RENDERER=LIBYANG
      --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
      $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
    - while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 5; done
    # Old version that gets blocked:
    #- while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 5; done
    # Wait until any worker logs "Initialization completed" (from the start of logs)
    # -m1 makes grep exit as soon as the line appears.
    # With set -o pipefail, docker logs will get SIGPIPE when grep exits;
    #   `|| true` neutralizes that so the pipeline’s status reflects grep’s success.
    - (docker logs -f nbi || true) 2>&1 | grep -m1 -Fi 'Initialization completed'
    - sleep 5 # Give extra time to NBI to get ready
    - docker ps -a
    - docker logs kafka