diff --git a/.github/workflows/dotnet-e2e-admin-tests.yml b/.github/workflows/dotnet-e2e-admin-tests.yml index 040ee69e..ad553d8f 100644 --- a/.github/workflows/dotnet-e2e-admin-tests.yml +++ b/.github/workflows/dotnet-e2e-admin-tests.yml @@ -28,19 +28,6 @@ jobs: - name: Start dev database run: ./install.sh configure-dev-db start - - name: Wait for database to be up - run: | - timeout=30 - while ! nc -z localhost 5433; do - if [ "$timeout" -le "0" ]; then - echo "Timed out waiting for database" - exit 1 - fi - echo "Waiting for database to be available on port 5433..." - sleep 1 - timeout=$((timeout-1)) - done - - name: Ensure browsers are installed run: pwsh src/Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps diff --git a/.github/workflows/dotnet-e2e-client-tests.yml b/.github/workflows/dotnet-e2e-client-tests.yml index bfbfcdd5..2107fff3 100644 --- a/.github/workflows/dotnet-e2e-client-tests.yml +++ b/.github/workflows/dotnet-e2e-client-tests.yml @@ -32,19 +32,6 @@ jobs: - name: Start dev database run: ./install.sh configure-dev-db start - - name: Wait for database to be up - run: | - timeout=30 - while ! nc -z localhost 5433; do - if [ "$timeout" -le "0" ]; then - echo "Timed out waiting for database" - exit 1 - fi - echo "Waiting for database to be available on port 5433..." - sleep 1 - timeout=$((timeout-1)) - done - - name: Ensure browsers are installed run: pwsh src/Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps diff --git a/.github/workflows/dotnet-e2e-misc-tests.yml b/.github/workflows/dotnet-e2e-misc-tests.yml index 79cf2dc8..4d0088c6 100644 --- a/.github/workflows/dotnet-e2e-misc-tests.yml +++ b/.github/workflows/dotnet-e2e-misc-tests.yml @@ -28,19 +28,6 @@ jobs: - name: Start dev database run: ./install.sh configure-dev-db start - - name: Wait for database to be up - run: | - timeout=30 - while ! nc -z localhost 5433; do - if [ "$timeout" -le "0" ]; then - echo "Timed out waiting for database" - exit 1 - fi - echo "Waiting for database to be available on port 5433..." - sleep 1 - timeout=$((timeout-1)) - done - - name: Ensure browsers are installed run: pwsh src/Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps diff --git a/.github/workflows/dotnet-integration-tests.yml b/.github/workflows/dotnet-integration-tests.yml index 754d43ba..846a9cb0 100644 --- a/.github/workflows/dotnet-integration-tests.yml +++ b/.github/workflows/dotnet-integration-tests.yml @@ -28,18 +28,5 @@ jobs: - name: Start dev database run: ./install.sh configure-dev-db start - - name: Wait for database to be up - run: | - timeout=30 - while ! nc -z localhost 5433; do - if [ "$timeout" -le "0" ]; then - echo "Timed out waiting for database" - exit 1 - fi - echo "Waiting for database to be available on port 5433..." - sleep 1 - timeout=$((timeout-1)) - done - - name: Run integration tests run: dotnet test src/Tests/AliasVault.IntegrationTests --no-build --verbosity normal diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 29dc7586..c4f83463 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -5,7 +5,7 @@ services: - "5433:5432" volumes: - ./database/postgres-dev:/var/lib/postgresql/data:rw - - ./postgresql.conf:/etc/postgresql/postgresql.conf + - ./src/Databases/AliasServerDb/postgresql.conf:/etc/postgresql/postgresql.conf environment: - POSTGRES_DB=aliasvault - POSTGRES_USER=aliasvault diff --git a/install.sh b/install.sh index f6ac1a89..72c865fa 100755 --- a/install.sh +++ b/install.sh @@ -1510,7 +1510,7 @@ configure_dev_database() { printf "${YELLOW}> Development database is already running.${NC}\n" else printf "${CYAN}> Starting development database...${NC}\n" - docker compose -p aliasvault-dev -f docker-compose.dev.yml up -d + docker compose -p aliasvault-dev -f docker-compose.dev.yml up -d --wait --wait-timeout 60 printf "${GREEN}> Development database started successfully.${NC}\n" fi print_dev_db_details @@ -1564,7 +1564,7 @@ configure_dev_database() { printf "${YELLOW}> Development database is already running.${NC}\n" else printf "${CYAN}> Starting development database...${NC}\n" - docker compose -p aliasvault-dev -f docker-compose.dev.yml up -d + docker compose -p aliasvault-dev -f docker-compose.dev.yml up -d --wait --wait-timeout 60 printf "${GREEN}> Development database started successfully.${NC}\n" fi print_dev_db_details