Skip to content

Commit

Permalink
removing sqlcmd since circle-cli do not support ubuntu 16.4 build host
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaric committed Feb 26, 2017
1 parent 941f2dc commit 55d4dbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- sudo apt-get install mssql-tools unixodbc-dev
- echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
- source ~/.bashrc
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=${SQL_PASSWORD}' -p 1433:1433 -d microsoft/mssql-server-linux
- docker run -d -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=${SQL_PASSWORD}' -p 1433:1433 --name=sqlserver --restart=no --bind 127.0.0.1 microsoft/mssql-server-linux
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
Expand All @@ -33,4 +33,5 @@ general:
- ecto2
test:
override:
- mix test
- mix test
- docker rm -f sqlserver
13 changes: 9 additions & 4 deletions test/storage_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,24 @@ defmodule Tds.Ecto.StorageTest do
test "storage up (twice in a row)" do
assert :ok == Tds.Ecto.storage_up(params())
assert {:error, :already_up} == Tds.Ecto.storage_up(params())
{_, 0} = drop_database(params())
# circle-cli has ubuntu 14.4 which can't run sqlcmd...'
# {_, 0} = drop_database(params())
assert Tds.Ecto.storage_down(params()) == :ok
end

test "storage down (twice in a row)" do
{_, 0} = create_database(params())
# {_, 0} = create_database(params())
assert :ok == Tds.Ecto.storage_up(params())
assert :ok == Tds.Ecto.storage_down(params())
assert {:error, :already_down} == Tds.Ecto.storage_down(params())
end

test "storage up and down (wrong credentials)" do
refute Tds.Ecto.storage_up(wrong_params()) == :ok
{_, 0} = create_database(params())
assert Tds.Ecto.storage_up(params()) == :ok
# {_, 0} = create_database(params())
refute Tds.Ecto.storage_down(wrong_params()) == :ok
{_, 0} = drop_database(params())
assert Tds.Ecto.storage_down(params()) == :ok
# {_, 0} = drop_database(params())
end
end

0 comments on commit 55d4dbd

Please sign in to comment.