Skip to content

Commit

Permalink
CI test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Mar 1, 2020
1 parent 1bc34d1 commit 8b8f5e2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=localhost
# PG_HOST=localhost
PG_HOST=localhost
MIX_ENV=test
# CIRCLE_BRANCH=$$(if [ -v CIRCLE_BRANCH ]; then echo master; else git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; fi)
CIRCLE_BRANCH=$CIRCLE_BRANCH
Expand Down
4 changes: 2 additions & 2 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ config :paper_trail, PaperTrail.Repo,
username: System.get_env("POSTGRES_USER"),
password: System.get_env("POSTGRES_PASSWORD"),
database: "paper_trail_test",
hostname: System.get_env("PGHOST"),
hostname: System.get_env("PG_HOST"),
poolsize: 10

config :paper_trail, PaperTrail.UUIDRepo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("POSTGRES_USER"),
password: System.get_env("POSTGRES_PASSWORD"),
database: "paper_trail_uuid_test",
hostname: System.get_env("PGHOST"),
hostname: System.get_env("PG_HOST"),
poolsize: 10
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
PGPORT: 5432
PGHOST: db
PG_HOST: db
MIX_ENV: $MIX_ENV
tty: true
depends_on:
Expand Down
1 change: 1 addition & 0 deletions test/paper_trail/bang_functions_simple_mode_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule PaperTrailTest.SimpleModeBangFunctions do
setup_all do
Application.put_env(:paper_trail, :strict_mode, false)
Application.put_env(:paper_trail, :repo, PaperTrail.Repo)
Application.put_env(:paper_trail, :originator_type, :integer)
Code.eval_file("lib/paper_trail.ex")
Code.eval_file("lib/version.ex")
MultiTenant.setup_tenant(@repo)
Expand Down
1 change: 1 addition & 0 deletions test/paper_trail/bang_functions_strict_mode_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule PaperTrailTest.StrictModeBangFunctions do
setup_all do
Application.put_env(:paper_trail, :strict_mode, true)
Application.put_env(:paper_trail, :repo, PaperTrail.Repo)
Application.put_env(:paper_trail, :originator_type, :integer)
Code.eval_file("lib/paper_trail.ex")
Code.eval_file("lib/version.ex")
MultiTenant.setup_tenant(@repo)
Expand Down
1 change: 1 addition & 0 deletions test/paper_trail/paper_trail_version_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule PaperTrailTest.Version do
setup_all do
Application.put_env(:paper_trail, :strict_mode, false)
Application.put_env(:paper_trail, :repo, PaperTrail.Repo)
Application.put_env(:paper_trail, :originator_type, :integer)
Code.eval_file("lib/paper_trail.ex")
Code.eval_file("lib/version.ex")
MultiTenant.setup_tenant(@repo)
Expand Down
3 changes: 3 additions & 0 deletions test/paper_trail/version_queries_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ defmodule PaperTrailTest.VersionQueries do
@repo PaperTrail.RepoClient.repo()

setup_all do
Application.put_env(:paper_trail, :repo, PaperTrail.Repo)
Application.put_env(:paper_trail, :originator_type, :integer)
Code.eval_file("lib/version.ex")
MultiTenant.setup_tenant(@repo)
reset_all_data()

Expand Down

0 comments on commit 8b8f5e2

Please sign in to comment.