From 71b3655e5d78660e8fbea93bcdf7cbcdea639631 Mon Sep 17 00:00:00 2001 From: whossname Date: Sat, 14 Sep 2019 14:06:35 +0800 Subject: [PATCH] fix travis --- .travis.yml | 1 - Dockerfile | 2 +- docker-compose.yml | 10 +++++----- integration/mssql/all_ecto_test.exs | 14 ++++++++++++-- integration/mssql/test_helper.exs | 1 + mix.exs | 4 ++-- mix.lock | 4 +++- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index b7d3fb2..0beda07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: required language: elixir elixir: diff --git a/Dockerfile b/Dockerfile index 08c27ac..d20b24a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ENV LC_ALL en_US.UTF-8 # --- MSSQL ODBC INSTALL --- RUN apt-get update && \ - apt-get -y install curl apt-transport-https gnupg2 && \ + apt-get -y install git curl apt-transport-https gnupg2 && \ curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \ apt-get update && \ diff --git a/docker-compose.yml b/docker-compose.yml index 687ff0e..a758cda 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,24 +4,24 @@ services: image: microsoft/mssql-server-linux environment: - ACCEPT_EULA=Y - - SA_PASSWORD=TestPa$$word123 - - MSSQL_TCP_PORT=9204 + - SA_PASSWORD=ThePa$$word + - MSSQL_TCP_PORT=1433 mssql_ecto: build: . environment: - MIX_ENV=test - MSSQL_UID=sa - - MSSQL_PWD=TestPa$$word123 + - MSSQL_PWD=ThePa$$word - MSSQL_HST=sql_server - MSSQL_IN=MSSQLSERVER - - MSSQL_PRT=9204 + - MSSQL_PRT=1433 - MSSQL_DVR={ODBC Driver 17 for SQL Server} - TRAVIS_JOB_ID=$TRAVIS_JOB_ID volumes: - .:/usr/src/app/ - /usr/src/app/deps - /usr/src/app/_build - entrypoint: ./bash_scripts/wait-for-it.sh sql_server:9204 -- + entrypoint: ./bash_scripts/wait-for-it.sh sql_server:1433 -- command: mix test diff --git a/integration/mssql/all_ecto_test.exs b/integration/mssql/all_ecto_test.exs index 8f84466..5800ce0 100644 --- a/integration/mssql/all_ecto_test.exs +++ b/integration/mssql/all_ecto_test.exs @@ -7,20 +7,30 @@ ecto = "#{ecto}/integration_test/cases" > Code.require_file("assoc.exs", ecto) Most tests pass. + * Throws "No SQL-driver information available." error instead of expected errors. -* uuid unique contraint changeset doesn't work +* Unique contraint * cascading delete doesn't work -* many-to-many doesn't retrun duplicates +* many-to-many doesn't return duplicates > Code.require_file("joins.exs", ecto) 2 tests fail. +* Incorrect syntax near the keyword 'ON' +* Unique constraint + + > Code.require_file("preload.exs", ecto) most tests pass. Needs investigation +* Unique constraint +* Incorrect syntax 'COUNT' +* Incorrect preload behaviour + > Code.require_file("repo.exs", ecto) most tests pass. Needs investigation +* # Needs investigation diff --git a/integration/mssql/test_helper.exs b/integration/mssql/test_helper.exs index 21e506b..ab5c3d3 100644 --- a/integration/mssql/test_helper.exs +++ b/integration/mssql/test_helper.exs @@ -27,6 +27,7 @@ Application.put_env( adapter: MssqlEcto, username: System.get_env("MSSQL_UID"), password: System.get_env("MSSQL_PWD"), + hostname: System.get_env("MSSQL_HST", "localhost"), database: "mssql_ecto_integration_test", pool: Ecto.Adapters.SQL.Sandbox ) diff --git a/mix.exs b/mix.exs index 2ce77aa..95cf371 100644 --- a/mix.exs +++ b/mix.exs @@ -33,11 +33,11 @@ defmodule MssqlEcto.Mixfile do [ {:mssqlex, git: "https://github.com/whossname/mssqlex.git", branch: "db_connection_2.0"}, {:ecto_sql, "~> 3.1"}, - {:db_connection, path: "../db_connection", override: true}, + {:db_connection, "~> 2.1"}, # tooling {:ex_doc, "~> 0.15", only: :dev, runtime: false}, - {:dialyxir, "~> 0.4", only: [:dev]}, + {:dialyxir, "~> 1.0.0-rc.6", only: [:dev], runtime: false}, {:excoveralls, "~> 0.6", only: :test}, {:inch_ex, "~> 0.5", only: :docs}, ] diff --git a/mix.lock b/mix.lock index f7b426d..2f02d53 100644 --- a/mix.lock +++ b/mix.lock @@ -1,11 +1,13 @@ %{ "certifi": {:hex, :certifi, "2.5.1", "867ce347f7c7d78563450a18a6a28a8090331e77fa02380b4a21962a65d36ee5", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"}, "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"}, + "db_connection": {:hex, :db_connection, "2.1.1", "a51e8a2ee54ef2ae6ec41a668c85787ed40cb8944928c191280fe34c15b76ae5", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"}, "decimal": {:hex, :decimal, "1.8.0", "ca462e0d885f09a1c5a342dbd7c1dcf27ea63548c65a65e67334f4b61803822e", [:mix], [], "hexpm"}, - "dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm"}, + "dialyxir": {:hex, :dialyxir, "1.0.0-rc.6", "78e97d9c0ff1b5521dd68041193891aebebce52fc3b93463c0a6806874557d7d", [:mix], [{:erlex, "~> 0.2.1", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm"}, "earmark": {:hex, :earmark, "1.3.5", "0db71c8290b5bc81cb0101a2a507a76dca659513984d683119ee722828b424f6", [:mix], [], "hexpm"}, "ecto": {:hex, :ecto, "3.1.7", "fa21d06ef56cdc2fdaa62574e8c3ba34a2751d44ea34c30bc65f0728421043e5", [:mix], [{:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, "ecto_sql": {:hex, :ecto_sql, "3.1.6", "1e80e30d16138a729c717f73dcb938590bcdb3a4502f3012414d0cbb261045d8", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.1.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.9.1", [hex: :mariaex, repo: "hexpm", optional: true]}, {:myxql, "~> 0.2.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.14.0 or ~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"}, + "erlex": {:hex, :erlex, "0.2.4", "23791959df45fe8f01f388c6f7eb733cc361668cbeedd801bf491c55a029917b", [:mix], [], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.21.1", "5ac36660846967cd869255f4426467a11672fec3d8db602c429425ce5b613b90", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, "excoveralls": {:hex, :excoveralls, "0.11.1", "dd677fbdd49114fdbdbf445540ec735808250d56b011077798316505064edb2c", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"}, "hackney": {:hex, :hackney, "1.15.1", "9f8f471c844b8ce395f7b6d8398139e26ddca9ebc171a8b91342ee15a19963f4", [:rebar3], [{:certifi, "2.5.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.4", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"},