diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index d1246d7..aa91190 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -5,7 +5,7 @@ on: jobs: build-and-test: - name: Build docker and Run E2E Tests + name: Install docker and Run E2E Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -15,9 +15,8 @@ jobs: go-version: '1.20' - name: Install Docker Compose run: | - sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa sudo apt-get update sudo apt-get install docker-compose docker-compose --version - - name: Build and Start Docker Compose + - name: Build docker and Run E2E Tests run: ./e2e_tests/run-e2e-tests.sh \ No newline at end of file diff --git a/e2e_tests/docker-compose.yml b/e2e_tests/docker-compose.yml index 1e7281f..7b0830f 100644 --- a/e2e_tests/docker-compose.yml +++ b/e2e_tests/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.5" - networks: default: name: maeve-csms diff --git a/e2e_tests/run-e2e-tests.sh b/e2e_tests/run-e2e-tests.sh index 1af9cc3..ab9682b 100755 --- a/e2e_tests/run-e2e-tests.sh +++ b/e2e_tests/run-e2e-tests.sh @@ -41,7 +41,6 @@ start_docker_compose_for_everest() { echo "Waiting for services to initialize..." sleep 30 - docker-compose logs } # Function to stop Docker Compose @@ -74,21 +73,14 @@ check_health_endpoint() { run_tests() { echo "Running test command..." cd "$TEST_DIR" - # Run your command and redirect stderr to /dev/null go test --tags=e2e -v ./... -count=1 - # Check the exit code of the command - if [ $? -ne 0 ]; then - echo "Error: Process completed with exit code 1 ignored." - fi -# TEST_RESULT=$? - docker-compose logs + TEST_RESULT=$? cd "$CSMS_DIR" - docker-compose logs -# if [ $TEST_RESULT -eq 0 ]; then -# echo "Tests completed successfully" -# else -# echo "Tests failed" -# fi + if [ $TEST_RESULT -eq 0 ]; then + echo "Tests completed successfully" + else + echo "Tests failed" + fi stop_docker_compose_for_everest stop_docker_compose_for_maeve_csms