From 941f2dc82a1691d4f0b70c21091608f0daf41f28 Mon Sep 17 00:00:00 2001 From: Milan Jaric Date: Sun, 26 Feb 2017 23:44:09 +0100 Subject: [PATCH] removing sqlcmd --- circle.yml | 9 ++++----- test/storage_test.exs | 4 ++-- test/test_helper.exs | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/circle.yml b/circle.yml index b58437c..097aecb 100644 --- a/circle.yml +++ b/circle.yml @@ -12,17 +12,16 @@ dependencies: - asdf plugin-add elixir https://github.com/HashNuke/asdf-elixir.git - erlang_version=$(awk '/erlang/ { print $2 }' .tool-versions) && asdf install erlang ${erlang_version} - elixir_version=$(awk '/elixir/ { print $2 }' .tool-versions) && asdf install elixir ${elixir_version} - - mix local.hex --force - - mix local.rebar --force - - yes | mix deps.get - curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list - sudo apt-get update - 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=Som320923!!!2932#ePassword2938474' -p 1433:1433 -d microsoft/mssql-server-linux - - sqlcmd -S localhost -U SA -P Som320923!!!2932#ePassword2938474 -Q "CREATE LOGIN mssql WITH PASSWORD = 'mssql'; CREATE USER mssql FOR LOGIN mssql; sp_addsrvrolemember 'mssql', 'sysadmin'" + - docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=${SQL_PASSWORD}' -p 1433:1433 -d microsoft/mssql-server-linux + - mix local.hex --force + - mix local.rebar --force + - mix deps.get cache_directories: - ~/.asdf - ~/.mix diff --git a/test/storage_test.exs b/test/storage_test.exs index f25171f..13d8b5f 100644 --- a/test/storage_test.exs +++ b/test/storage_test.exs @@ -6,8 +6,8 @@ defmodule Tds.Ecto.StorageTest do def params do [database: "storage_mgt", pool: Ecto.Adapters.SQL.Sandbox, - username: "mssql", - password: "mssql", + username: "sa", + password: System.get_env("SQL_PASSWORD") || "mssql", hostname: "localhost"] end diff --git a/test/test_helper.exs b/test/test_helper.exs index ed175e9..afa31af 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -24,8 +24,8 @@ Application.put_env(:ecto, TestRepo, filter_null_on_unique_indexes: true, adapter: Tds.Ecto, hostname: "localhost", - username: "mssql", - password: "mssql", + username: "sa", + password: System.get_env("SQL_PASSWORD") || "mssql", database: "ecto_test", pool: Ecto.Adapters.SQL.Sandbox, pool_size: 10, @@ -43,8 +43,8 @@ Application.put_env(:ecto, PoolRepo, adapter: Tds.Ecto, pool: pool, hostname: "localhost", - username: "mssql", - password: "mssql", + username: "sa", + password: System.get_env("SQL_PASSWORD") || "mssql", database: "ecto_test", pool_size: 10)