parent
26a81be456
commit
ecd8b0020e
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"DbConnection": {
|
||||
"Host": "postgres",
|
||||
"Host": "localhost",
|
||||
"Port": 5442,
|
||||
"Username": "postgres",
|
||||
"Password": "postgres"
|
||||
|
@ -24,8 +24,8 @@ public class WebAppFactoryFixture : WebApplicationFactory<Program>
|
||||
config.AddJsonFile("appsettings.Tests.json");
|
||||
|
||||
var dbConnection = config.Build().GetSection("DbConnection").Get<DbConnection>()!;
|
||||
//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 =>
|
||||
|
Loading…
Reference in New Issue
Block a user