Skip to content

Commit

Permalink
[tests] Force MIX_ENV for all mix commands in test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpjolicoeur committed Jun 10, 2020
1 parent 3ba11b4 commit d563520
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/support/apps/phx1_3/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MIX_ENV=test mix ecto.drop || { echo 'Database could not be dropped'; exit 1; }
MIX_ENV=test mix torch.install || { echo 'Torch could not be installed!'; exit 1; }
MIX_ENV=test mix torch.gen.html Blog Post posts title:string published:boolean published_at:datetime views:integer || { echo 'Torch files not generated!'; exit 1; }
cp ../../routers/phx1_3_modified.ex lib/example_web/router.ex
mix test || { echo 'Tests failed!'; cleanup; exit 1; }
MIX_ENV=test mix test || { echo 'Tests failed!'; cleanup; exit 1; }
cleanup

echo 'Tests succeeded!'
Expand Down
2 changes: 1 addition & 1 deletion test/support/apps/phx1_4/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MIX_ENV=test mix ecto.drop || { echo 'Database could not be dropped'; exit 1; }
MIX_ENV=test mix torch.install || { echo 'Torch could not be installed!'; exit 1; }
MIX_ENV=test mix torch.gen.html Blog Post posts title:string published:boolean published_at:datetime views:integer || { echo 'Torch files not generated!'; exit 1; }
cp ../../routers/phx1_4_modified.ex lib/phx1_4_web/router.ex
mix test || { echo 'Tests failed!'; cleanup; exit 1; }
MIX_ENV=test mix test || { echo 'Tests failed!'; cleanup; exit 1; }
cleanup

echo 'Tests succeeded!'
Expand Down
2 changes: 1 addition & 1 deletion test/support/apps/phx1_5/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MIX_ENV=test mix ecto.drop || { echo 'Database could not be dropped'; exit 1; }
MIX_ENV=test mix torch.install || { echo 'Torch could not be installed!'; exit 1; }
MIX_ENV=test mix torch.gen.html Blog Post posts title:string published:boolean published_at:datetime views:integer || { echo 'Torch files not generated!'; exit 1; }
cp ../../routers/phx1_5_modified.ex lib/phx1_5_web/router.ex
mix test || { echo 'Tests failed!'; cleanup; exit 1; }
MIX_ENV=test mix test || { echo 'Tests failed!'; cleanup; exit 1; }

# Ensure that put_root_layout is used by default on > Phx 1.5
if ! grep -q "plug(:put_root_layout" lib/phx1_5_web/controllers/post_controller.ex ; then
Expand Down

0 comments on commit d563520

Please sign in to comment.