mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-25 09:43:20 +01:00
Fix location of HISHTORY_COMPOSE_TEST var
This commit is contained in:
parent
7dc0fffa4a
commit
42f9df9fcc
@ -19,7 +19,6 @@ services:
|
|||||||
POSTGRES_PASSWORD: TODO_YOUR_POSTGRES_PASSWORD_HERE
|
POSTGRES_PASSWORD: TODO_YOUR_POSTGRES_PASSWORD_HERE
|
||||||
POSTGRES_DB: hishtory
|
POSTGRES_DB: hishtory
|
||||||
PGDATA: /var/lib/postgresql/data/pgdata
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||||||
HISHTORY_COMPOSE_TEST: $HISHTORY_COMPOSE_TEST
|
|
||||||
volumes:
|
volumes:
|
||||||
- postgres-data:/var/lib/postgresql/data
|
- postgres-data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -42,6 +41,7 @@ services:
|
|||||||
delay: 3s
|
delay: 3s
|
||||||
environment:
|
environment:
|
||||||
HISHTORY_POSTGRES_DB: postgresql://postgres:TODO_YOUR_POSTGRES_PASSWORD_HERE@postgres:5432/hishtory?sslmode=disable
|
HISHTORY_POSTGRES_DB: postgresql://postgres:TODO_YOUR_POSTGRES_PASSWORD_HERE@postgres:5432/hishtory?sslmode=disable
|
||||||
|
HISHTORY_COMPOSE_TEST: $HISHTORY_COMPOSE_TEST
|
||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -102,6 +102,7 @@ func OpenDB() (*database.DB, error) {
|
|||||||
}
|
}
|
||||||
if os.Getenv("HISHTORY_COMPOSE_TEST") != "" {
|
if os.Getenv("HISHTORY_COMPOSE_TEST") != "" {
|
||||||
// Run an extra round of migrations to test the migration code path to prevent issues like #241
|
// Run an extra round of migrations to test the migration code path to prevent issues like #241
|
||||||
|
fmt.Println("AutoMigrating DB tables a second time for test coverage")
|
||||||
err := db.AddDatabaseTables()
|
err := db.AddDatabaseTables()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create underlying DB tables: %w", err)
|
return nil, fmt.Errorf("failed to create underlying DB tables: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user