diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index d67b4f05..3849b92f 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -132,6 +132,12 @@ jobs: echo "Running tests for ${{ matrix.test_service }} with flags: ${{ matrix.test_cmd }}" RUST_LOG="info" DISABLE_CI_TEST_LOG="true" cargo test ${{ matrix.test_cmd }} + - name: Server Logs + if: failure() + run: | + docker ps -a + docker compose -f docker-compose-ci.yml logs + - name: Docker Logs if: always() run: | diff --git a/admin_frontend/README.md b/admin_frontend/README.md index a2b8c75c..59b256c8 100644 --- a/admin_frontend/README.md +++ b/admin_frontend/README.md @@ -15,3 +15,4 @@ - Go to [web server](localhost) - After editing source files, do `docker compose up -d --no-deps --build admin_frontend` - You might need to add `--force-recreate` flag for non build changes to take effect + diff --git a/admin_frontend/tests/utils/mod.rs b/admin_frontend/tests/utils/mod.rs index 1416fba2..dd2a8125 100644 --- a/admin_frontend/tests/utils/mod.rs +++ b/admin_frontend/tests/utils/mod.rs @@ -42,6 +42,7 @@ impl AdminFrontendClient { .send() .await .unwrap(); + let resp = check_resp(resp).await; let c = resp.cookies().find(|c| c.name() == "session_id").unwrap(); self.session_id = Some(c.value().to_string()); } @@ -84,3 +85,12 @@ impl AdminFrontendClient { self.session_id.as_ref().unwrap() } } + +async fn check_resp(resp: reqwest::Response) -> reqwest::Response { + if resp.status() != 200 { + println!("resp: {:#?}", resp); + let payload = resp.text().await.unwrap(); + panic!("payload: {:#?}", payload) + } + resp +} diff --git a/docker/gotrue/start.sh b/docker/gotrue/start.sh index 3a1aaec6..226c1ae0 100755 --- a/docker/gotrue/start.sh +++ b/docker/gotrue/start.sh @@ -5,7 +5,7 @@ set -e if [ -n "${GOTRUE_ADMIN_EMAIL}" ] && [ -n "${GOTRUE_ADMIN_PASSWORD}" ]; then set +e echo "Creating admin user for gotrue..." - command_output=$(./auth admin createuser --admin "${GOTRUE_ADMIN_EMAIL}" "${GOTRUE_ADMIN_PASSWORD}" 2>&1) + command_output=$(./auth admin createuser --admin --confirm "${GOTRUE_ADMIN_EMAIL}" "${GOTRUE_ADMIN_PASSWORD}" 2>&1) command_status=$? # Check if the command failed if [ $command_status -ne 0 ]; then