-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AB#139 fix: adjust setup to run integration tests in isolated dbs
- Loading branch information
1 parent
fa39d12
commit 4bd0a13
Showing
17 changed files
with
154 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DATABASE_URL=postgresql://developer:Safe1!@localhost:5432/terraapprove?schema=public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DATABASE_URL=postgresql://developer:Safe1!@localhost:5433/terraapprove?schema=public |
Binary file not shown.
Binary file added
BIN
+7.07 KB
service/.yarn/cache/dotenv-expand-npm-10.0.0-fa5b032ad9-b41eb278bc.zip
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
service/db-migrations/integration-test.liquibase.docker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Directory in the Docker container where the changelog files are located | ||
searchPath: /liquibase/changelog | ||
# Assume that a DB is running on the same host as the Liquibase container | ||
url: jdbc:postgresql://localhost:5433/terraapprove | ||
changeLogFile: root-changelog.yaml | ||
username: developer | ||
password: Safe1! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: 6db0ccdc-c96c-474a-a549-d4df7c848207 | ||
author: Giovanni Baratta | ||
comment: Set database as tempalte | ||
changes: | ||
- sql: | ||
dbms: "postgresql" | ||
sql: ALTER DATABASE terraapprove WITH is_template TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Injectable} from "@nestjs/common" | ||
|
||
@Injectable() | ||
export class Config { | ||
private dbConnectionUrl: string | ||
|
||
constructor() { | ||
const connectionUrl = process.env.DATABASE_URL | ||
|
||
if (connectionUrl === undefined) | ||
throw new Error("DATABASE_URL is not defined") | ||
|
||
this.dbConnectionUrl = connectionUrl | ||
} | ||
|
||
getDbConnectionUrl(): string { | ||
return this.dbConnectionUrl | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters