Skip to content

Commit

Permalink
chore: rename DATABASE_URL to POSTGRES_URL for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Dec 25, 2023
1 parent a705366 commit 86e0561
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ ENVIRONMENT=
BOT_TOKEN=
SENTRY_DSN=
REDIS_URL=
DATABASE_URL=
POSTGRES_URL=
MONGO_URL=
TZ=
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: go test -v -coverprofile=coverage.out -covermode=atomic ./...
env:
ENVIRONMENT: development
DATABASE_URL: postgres://postgres:password@db:5432/captcha?sslmode=disable
POSTGRES_URL: postgres://postgres:password@db:5432/captcha?sslmode=disable
REDIS_URL: redis://@cache:6379/
MONGO_URL: mongodb://root:password@mongo:27017/captcha?useNewUrlParser=true&useUnifiedTopology=true&authSource=admin
MONGO_DBNAME: captcha
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: go test -v -coverprofile=coverage.out -covermode=atomic ./...
env:
ENVIRONMENT: development
DATABASE_URL: postgres://postgres:password@db:5432/captcha?sslmode=disable
POSTGRES_URL: postgres://postgres:password@db:5432/captcha?sslmode=disable
REDIS_URL: redis://@cache:6379/
MONGO_URL: mongodb://root:password@mongo:27017/captcha?useNewUrlParser=true&useUnifiedTopology=true&authSource=admin
MONGO_DBNAME: captcha
Expand Down
2 changes: 1 addition & 1 deletion analytics/analytics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
var dependency *analytics.Dependency

func TestMain(m *testing.M) {
databaseUrl, ok := os.LookupEnv("DATABASE_URL")
databaseUrl, ok := os.LookupEnv("POSTGRES_URL")
if !ok {
databaseUrl = "postgresql://postgres:password@localhost:5432/captcha?sslmode=disable"
}
Expand Down
2 changes: 1 addition & 1 deletion analytics/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestMain(m *testing.M) {
mongoDbName = "captcha"
}

databaseUrl, ok := os.LookupEnv("DATABASE_URL")
databaseUrl, ok := os.LookupEnv("POSTGRES_URL")
if !ok {
databaseUrl = "postgresql://postgres:password@localhost:5432/captcha?sslmode=disable"
}
Expand Down
2 changes: 1 addition & 1 deletion underattack/underattack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
var dependency *underattack.Dependency

func TestMain(m *testing.M) {
databaseUrl, ok := os.LookupEnv("DATABASE_URL")
databaseUrl, ok := os.LookupEnv("POSTGRES_URL")
if !ok {
databaseUrl = "postgresql://postgres:password@localhost:5432/captcha?sslmode=disable"
}
Expand Down

0 comments on commit 86e0561

Please sign in to comment.