diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 9acccb6..214e321 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -2,6 +2,13 @@ name: Unit tests run-name: ${{ gitea.actor }} is testing on: push +env: + registry: my_registry_name + # Not sure these are actually being passed down to rails, set them as the default in database.yml + DB_HOST: localhost + DB_USERNAME: postgres + DB_PASSWORD: postgres + jobs: test: runs-on: ubuntu-latest @@ -14,8 +21,6 @@ jobs: image: postgres # Provide the password for postgres env: - POSTGRES_HOST: postgres - POSTGRES_DB: persistence POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres # Set health checks to wait until postgres has started diff --git a/DD.Persistence.App/appsettings.Tests.json b/DD.Persistence.App/appsettings.Tests.json index 5bd5c2e..5d17ab1 100644 --- a/DD.Persistence.App/appsettings.Tests.json +++ b/DD.Persistence.App/appsettings.Tests.json @@ -1,6 +1,6 @@ { "DbConnection": { - "Host": "postgres", + "Host": "localhost", "Port": 5442, "Username": "postgres", "Password": "postgres" diff --git a/DD.Persistence.IntegrationTests/WebAppFactoryFixture.cs b/DD.Persistence.IntegrationTests/WebAppFactoryFixture.cs index 65edb95..76cf71b 100644 --- a/DD.Persistence.IntegrationTests/WebAppFactoryFixture.cs +++ b/DD.Persistence.IntegrationTests/WebAppFactoryFixture.cs @@ -24,8 +24,8 @@ public class WebAppFactoryFixture : WebApplicationFactory config.AddJsonFile("appsettings.Tests.json"); var dbConnection = config.Build().GetSection("DbConnection").Get()!; - //connectionString = dbConnection.GetConnectionString(); - connectionString = "Host=postgres;Port=5442;Username=postgres;Password=postgres;Database=persistence"; + connectionString = dbConnection.GetConnectionString(); + //connectionString = "Host=postgres;Port=5442;Username=postgres;Password=postgres;Database=persistence"; }); builder.ConfigureServices(services =>