правка
Some checks failed
Unit tests / test (push) Failing after 1m39s

This commit is contained in:
Оля Бизюкова 2024-12-17 18:11:15 +05:00
parent 26a81be456
commit ecd8b0020e
3 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
{
"DbConnection": {
"Host": "postgres",
"Host": "localhost",
"Port": 5442,
"Username": "postgres",
"Password": "postgres"

View File

@ -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 =>