diff --git a/.circleci/config.yml b/.circleci/config.yml index 203d65ea..2e485bf5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,15 +26,15 @@ executors: parameters: erlang_version: type: string - default: "22.0" + default: "24.3.4.5" elixir_version: type: string - default: "1.9" + default: "1.13.4" env: type: string default: test docker: - - image: mongooseim/beam-builder:erlang-<< parameters.erlang_version >>_elixir-<< parameters.elixir_version >> + - image: hexpm/elixir:<< parameters.elixir_version >>-erlang-<< parameters.erlang_version >>-ubuntu-focal-20211006 - image: mongooseim/fcm-mock-server - image: kamilwaz/apns-mock-server working_directory: ~/app @@ -45,6 +45,16 @@ commands: test: steps: - checkout + - run: + name: Install dockerize + command: | + apt-get update && apt-get install -y wget && \ + wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz && \ + chmod +x dockerize-linux-amd64-v0.6.1.tar.gz && \ + tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz && \ + chmod +x /usr/local/bin/dockerize && \ + rm dockerize-linux-amd64-v0.6.1.tar.gz + - run: apt-get update && apt-get install -y git - restore_cache: keys: - mix-cache-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ .Revision }} @@ -74,6 +84,7 @@ jobs: steps: - checkout + - run: apt-get update && apt-get install -y git - run: mix local.hex --force - run: mix local.rebar --force - run: mix deps.get @@ -89,6 +100,7 @@ jobs: executor: elixir-builder steps: - checkout + - run: apt-get update && apt-get install -y git - run: echo "$OTP_VERSION $ELIXIR_VERSION" > .version_file - restore_cache: keys: @@ -111,21 +123,12 @@ jobs: name: Execute dialyzer command: mix deps.get && mix dialyzer --halt-exit-status - test-erlang-22_elixir-1-9: - executor: - name: elixir-builder - env: test - erlang_version: "22.0" - elixir_version: "1.9" - steps: - - test - build-dev-certs: executor: name: elixir-builder env: dev - erlang_version: "22.0" - elixir_version: "1.9" + erlang_version: "24.3" + elixir_version: "1.13" steps: - checkout - restore_cache: @@ -142,48 +145,39 @@ jobs: paths: - priv - test-erlang-22_elixir-1-8: + test-erlang-24_elixir-1-13: executor: name: elixir-builder env: test - erlang_version: "22.0" - elixir_version: "1.8" + erlang_version: "24.3.4.5" + elixir_version: "1.13.4" steps: - test - test-erlang-22_elixir-1-7: + test-erlang-24_elixir-1-12: executor: name: elixir-builder env: test - erlang_version: "22.0" - elixir_version: "1.7" + erlang_version: "24.3.4.5" + elixir_version: "1.13.4" steps: - test - test-erlang-21_elixir-1-9: + test-erlang-23_elixir-1-13: executor: name: elixir-builder env: test - erlang_version: "21.3" - elixir_version: "1.9" + erlang_version: "23.3.4.17" + elixir_version: "1.12.3" steps: - test - test-erlang-21_elixir-1-8: + test-erlang-23_elixir-1-12: executor: name: elixir-builder env: test - erlang_version: "21.3" - elixir_version: "1.8" - steps: - - test - - test-erlang-21_elixir-1-7: - executor: - name: elixir-builder - env: test - erlang_version: "21.3" - elixir_version: "1.7" + erlang_version: "23.3.4.17" + elixir_version: "1.12.3" steps: - test @@ -203,6 +197,7 @@ jobs: env: prod steps: - checkout + - run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io - setup_remote_docker: docker_layer_caching: true - restore_cache: @@ -234,14 +229,14 @@ jobs: sudo apt-key add erlang_solutions.asc && \ echo 'deb https://packages.erlang-solutions.com/ubuntu focal contrib' | sudo tee /etc/apt/sources.list.d/esl.list && \ sudo apt-get update && \ - sudo apt-get install -y esl-erlang=1:21.3.8.17-1 && \ - sudo apt-get install -y elixir=1.10.2-1 + sudo apt-get install -y esl-erlang=1:24.3.3-1 && \ + sudo apt-get install -y elixir=1.13.0-1 wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz && \ sudo chmod +x dockerize-linux-amd64-v0.6.1.tar.gz && \ sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz && \ sudo chmod +x /usr/local/bin/dockerize && \ sudo rm dockerize-linux-amd64-v0.6.1.tar.gz - + - run: docker-compose -v - restore_cache: keys: - mix-cache-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ .Revision }} @@ -249,6 +244,7 @@ jobs: keys: - certs-cache-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ .Revision }} - run: *DOCKER_TAGS + - run: mix local.hex --force && mix local.rebar --force - run: name: Compile mix deps command: MIX_ENV=integration mix do deps.get, deps.compile @@ -271,6 +267,7 @@ jobs: env: prod steps: - checkout + - run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io - setup_remote_docker: docker_layer_caching: true - run: *DOCKER_TAGS @@ -289,17 +286,18 @@ jobs: gh-pages-deploy: machine: - image: ubuntu-1604:201903-01 + image: ubuntu-2004:2022.07.1 steps: - checkout - run: name: Install elixir command: | - wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \ - sudo dpkg -i erlang-solutions_1.0_all.deb && \ + wget https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc && \ + sudo apt-key add erlang_solutions.asc && \ + echo 'deb https://packages.erlang-solutions.com/ubuntu focal contrib' | sudo tee /etc/apt/sources.list.d/esl.list && \ sudo apt-get update && \ - sudo apt-get install -y esl-erlang=1:21.0 && \ - sudo apt-get install -y elixir=1.8.0-1 + sudo apt-get install -y esl-erlang=1:24.3.3-1 && \ + sudo apt-get install -y elixir=1.13.0-1 - restore_cache: keys: - mix-cache-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}-{{ .Revision }} @@ -343,19 +341,19 @@ workflows: requires: - pre-build filters: *all_tags - - test-erlang-22_elixir-1-9: + - test-erlang-24_elixir-1-13: requires: - pre-build filters: *all_tags - - test-erlang-22_elixir-1-8: + - test-erlang-24_elixir-1-12: requires: - pre-build filters: *all_tags - - test-erlang-21_elixir-1-9: + - test-erlang-23_elixir-1-13: requires: - pre-build filters: *all_tags - - test-erlang-21_elixir-1-8: + - test-erlang-23_elixir-1-12: requires: - pre-build filters: *all_tags @@ -373,7 +371,7 @@ workflows: requires: - integration-tests - build-docker-image - - test-erlang-22_elixir-1-9 + - test-erlang-23_elixir-1-13 filters: *all_tags - gh-pages-deploy: diff --git a/Dockerfile b/Dockerfile index 9ee0f635..dbdf37b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,11 @@ -FROM rslota/beam-builder:erlang-22.0_elixir-1.9 AS builder +ARG ELIXIR_VERSION=1.13.4 +ARG OTP_VERSION=24.3.4.5 + +FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-ubuntu-focal-20211006 as builder + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ + git \ + software-properties-common USER root @@ -8,7 +15,7 @@ ENV MIX_ENV=prod COPY mix.exs mix.lock ./ COPY config config -COPY asn.1 asn.1 +COPY asn1 asn1 COPY rel rel COPY lib lib COPY priv priv @@ -23,7 +30,7 @@ RUN mix do certs.dev, distillery.release RUN tar -czf mongoose_push.tar.gz -C _build/prod/rel/mongoose_push . -FROM debian:stretch-slim +FROM debian:sid-slim # set locales @@ -37,14 +44,13 @@ ENV LANGUAGE en_US.UTF-8 ENV LC_ALL en_US.UTF-8 # required packages -RUN echo 'deb http://deb.debian.org/debian jessie main' >> /etc/apt/sources.list RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y \ bash \ bash-completion \ curl \ dnsutils \ + libtinfo5 \ libssl1.1 \ - libssl1.0.0 \ vim && \ apt-get clean diff --git a/asn.1/APNS-Topics.asn b/asn1/APNS-Topics.asn similarity index 100% rename from asn.1/APNS-Topics.asn rename to asn1/APNS-Topics.asn diff --git a/config/config.exs b/config/config.exs index 64dcefab..fa90c055 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,6 +1,6 @@ # This file is responsible for configuring your application # and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config config :logger, handle_otp_reports: true, diff --git a/config/dev.exs b/config/dev.exs index 6e865f64..ba609d95 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config config :mongoose_push, openapi: [ diff --git a/config/integration.exs b/config/integration.exs index d2d855e6..becde769 100644 --- a/config/integration.exs +++ b/config/integration.exs @@ -1 +1 @@ -use Mix.Config +import Config diff --git a/config/prod.exs b/config/prod.exs index 7e8a3354..adfc84e5 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config config :mix_docker, image: "mongoose_push" diff --git a/config/test.exs b/config/test.exs index 3828c69a..a06afecb 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config config :mongoose_push, :logging, level: :error, diff --git a/lib/mix/tasks/compile_asn1.ex b/lib/mix/tasks/compile_asn1.ex deleted file mode 100644 index fa698d4e..00000000 --- a/lib/mix/tasks/compile_asn1.ex +++ /dev/null @@ -1,36 +0,0 @@ -defmodule Mix.Tasks.Compile.Asn1 do - @moduledoc """ - This task compiles all ASN.1 files (in `asn1/*.asn`) into erlang sources into `src` directory. - After that Erlang compiler (task Compile.Erlang) shall be run to compile them into .beam binaries. - """ - @shortdoc "Compiles ASN.1 files to Erlang sources" - - use Mix.Task - - @asn1_src "asn.1" - @erl_src "src" - - @spec run(term) :: :ok - def run(_) do - :ok = File.mkdir_p!(@erl_src) - to_compile = Path.join(@asn1_src, "**/*.asn") - - result = - for file <- Path.wildcard(to_compile) do - asn = Path.basename(file) - - :asn1ct.compile( - to_charlist(asn), - [:noobj, i: to_charlist(@asn1_src), outdir: to_charlist(@erl_src)] - ) - end - - case Enum.filter(result, &(&1 != :ok)) do - [] -> - :ok - - errors -> - {:error, errors} - end - end -end diff --git a/lib/mongoose_push/application.ex b/lib/mongoose_push/application.ex index cd790819..3bad9573 100644 --- a/lib/mongoose_push/application.ex +++ b/lib/mongoose_push/application.ex @@ -6,6 +6,14 @@ defmodule MongoosePush.Application do use Application require Logger + # APNS supports only: + # - ECDHE-RSA-AES128-GCM-SHA256 + # - ECDHE-RSA-AES256-GCM-SHA384 + @apns_ciphers [ + %{key_exchange: :ecdhe_rsa, cipher: :aes_128_gcm, mac: :aead, prf: :sha256}, + %{key_exchange: :ecdhe_rsa, cipher: :aes_256_gcm, mac: :aead, prf: :sha384} + ] + @typedoc "Possible keys in FCM config" @type fcm_key :: :key | :pool_size | :mode | :endpoint @typedoc "Possible keys in APNS config" @@ -209,12 +217,12 @@ defmodule MongoosePush.Application do end end - defp check_apns_ciphers() do - apns_ciphers_present = - Enum.any?(:ssl.cipher_suites(), fn x -> - x == {:ecdhe_rsa, :aes_128_gcm, :aead, :sha256} || - x == {:ecdhe_rsa, :aes_256_gcm, :aead, :sha384} - end) + def check_apns_ciphers() do + all_ciphers = + :ssl.versions()[:supported] + |> Enum.flat_map(&:ssl.cipher_suites(:all, &1)) + + apns_ciphers_present = Enum.any?(all_ciphers, &(&1 in @apns_ciphers)) case apns_ciphers_present do true -> diff --git a/lib/mongoose_push_web/controllers/api_v1_notification_controller.ex b/lib/mongoose_push_web/controllers/api_v1_notification_controller.ex index deb9a261..dd128d59 100644 --- a/lib/mongoose_push_web/controllers/api_v1_notification_controller.ex +++ b/lib/mongoose_push_web/controllers/api_v1_notification_controller.ex @@ -12,6 +12,7 @@ defmodule MongoosePushWeb.APIv1.NotificationController do %Operation{ tags: ["apiv1"], summary: "sends a push", + deprecated: true, description: "performs the sending of push notification", operationId: "APIv1.NotificationController.send", parameters: [ diff --git a/lib/mongoose_push_web/plugs/cast_and_validate.ex b/lib/mongoose_push_web/plugs/cast_and_validate.ex index 6182f44e..a0168f58 100644 --- a/lib/mongoose_push_web/plugs/cast_and_validate.ex +++ b/lib/mongoose_push_web/plugs/cast_and_validate.ex @@ -36,55 +36,68 @@ defmodule MongoosePushWeb.Plug.CastAndValidate do # so the framework can serve us as expected. defp update_schema_and_do_call( conn = %{params: %{"alert" => _, "data" => _}}, - opts = %{operation_id: operation_id} + opts ) do - new_schema = %OpenApiSpex.Reference{ - "$ref": "#/components/schemas/Request.SendNotification.Deep.MixedNotification" - } + new_opts = + %OpenApiSpex.Reference{ + "$ref": "#/components/schemas/Request.SendNotification.Deep.MixedNotification" + } + |> update_schema(conn, opts) - conn - |> update_schema(operation_id, new_schema) - |> OpenApiSpex.Plug.CastAndValidate.call(opts) + OpenApiSpex.Plug.CastAndValidate.call(conn, new_opts) end defp update_schema_and_do_call( conn = %{params: %{"data" => _}}, - opts = %{operation_id: operation_id} + opts ) do - new_schema = %OpenApiSpex.Reference{ - "$ref": "#/components/schemas/Request.SendNotification.Deep.SilentNotification" - } + new_opts = + %OpenApiSpex.Reference{ + "$ref": "#/components/schemas/Request.SendNotification.Deep.SilentNotification" + } + |> update_schema(conn, opts) - conn - |> update_schema(operation_id, new_schema) - |> OpenApiSpex.Plug.CastAndValidate.call(opts) + OpenApiSpex.Plug.CastAndValidate.call(conn, new_opts) end - defp update_schema_and_do_call(conn, opts = %{operation_id: operation_id}) do - new_schema = %OpenApiSpex.Reference{ - "$ref": "#/components/schemas/Request.SendNotification.Deep.AlertNotification" - } + defp update_schema_and_do_call(conn, opts) do + new_opts = + %OpenApiSpex.Reference{ + "$ref": "#/components/schemas/Request.SendNotification.Deep.AlertNotification" + } + |> update_schema(conn, opts) + + OpenApiSpex.Plug.CastAndValidate.call(conn, new_opts) + end + + def update_schema(new_schema, conn, %{operation_id: operation_id} = opts) do + new_operation_id = {operation_id, new_schema} + + spec_module = OpenApiSpex.Plug.PutApiSpec.spec_module(conn) + {spec, operation_lookup} = cache().get(spec_module) + + unless operation_lookup[new_operation_id] do + new_operation_lookup = + operation_lookup[operation_id] + |> update_in( + [ + Access.key(:requestBody), + Access.key(:content), + "application/json", + Access.key(:schema) + ], + fn %OpenApiSpex.Schema{oneOf: _listOfSchemas} -> new_schema end + ) + |> then(&Map.put(operation_lookup, new_operation_id, &1)) + + cache().put(spec_module, {spec, new_operation_lookup}) + end - conn - |> update_schema(operation_id, new_schema) - |> OpenApiSpex.Plug.CastAndValidate.call(opts) + Map.put(opts, :operation_id, new_operation_id) end - defp update_schema(conn, operation_id, new_schema) do - Kernel.update_in( - conn, - [ - Access.key(:private), - :open_api_spex, - :operation_lookup, - operation_id, - Access.key(:requestBody), - Access.key(:content), - "application/json", - Access.key(:schema) - ], - fn %OpenApiSpex.Schema{oneOf: _listOfSchemas} -> new_schema end - ) + defp cache() do + OpenApiSpex.Plug.Cache.adapter() end defp get_operation( diff --git a/lib/mongoose_push_web/schemas/request/send_notification/deep/common/data.ex b/lib/mongoose_push_web/schemas/request/send_notification/deep/common/data.ex index 5b4c20d5..d66714d4 100644 --- a/lib/mongoose_push_web/schemas/request/send_notification/deep/common/data.ex +++ b/lib/mongoose_push_web/schemas/request/send_notification/deep/common/data.ex @@ -9,6 +9,6 @@ defmodule MongoosePushWeb.Schemas.Request.SendNotification.Deep.Common.Data do "The FCM request with nested data can end up with error.", type: :object, example: Deep.data()[:example]["data"], - additionalProperties: true + additionalProperties: nil }) end diff --git a/mix.exs b/mix.exs index 82479e34..d8e988f2 100644 --- a/mix.exs +++ b/mix.exs @@ -16,6 +16,7 @@ defmodule MongoosePush.Mixfile do compilers: compilers(Mix.env()), aliases: aliases(), elixirc_paths: elixirc_paths(Mix.env()), + elixirc_options: elixirc_options(), test_paths: test_paths(Mix.env()), name: "MongoosePush", source_url: "https://github.com/esl/MongoosePush", @@ -35,34 +36,34 @@ defmodule MongoosePush.Mixfile do [ {:chatterbox, github: "joedevivo/chatterbox", ref: "1f4ce4f", override: true}, {:sparrow, github: "esl/sparrow", ref: "1760502"}, - {:plug_cowboy, "~> 2.0"}, - {:cowboy, "< 2.8.0", override: true}, - {:jason, "~> 1.0"}, - {:poison, "~> 3.0"}, + {:plug_cowboy, "~> 2.2"}, + {:jason, "~> 1.4"}, + {:poison, "~> 3.0", override: true}, {:distillery, "~> 2.0", override: true}, {:confex, "~> 3.2", override: true}, {:mix_docker, "~> 0.5"}, {:uuid, "~> 1.1"}, {:lager, ">= 3.7.0", override: true}, - {:phoenix, "~> 1.4.16"}, - {:open_api_spex, "~> 3.6"}, + {:phoenix, "~> 1.6"}, + {:open_api_spex, "~> 3.12"}, {:toml, "~> 0.6.1"}, + {:asn1_compiler, "~> 0.1.1"}, # Below only :dev / :test deps - {:httpoison, "~> 1.6.2"}, + {:httpoison, "~> 1.8"}, {:excoveralls, "~> 0.7", only: :test}, - {:dialyxir, "~> 1.0.0-rc.6", only: [:dev, :test], runtime: false}, - {:credo, "~> 0.5", only: [:dev, :test]}, + {:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false}, + {:credo, "~> 1.6", only: [:dev, :test]}, {:ex_doc, "~> 0.14", only: :dev}, {:quixir, "~> 0.9", only: [:test, :integration]}, - {:assert_eventually, "~> 0.2.0", only: [:test, :integration]}, - {:mox, "~> 0.5.2", only: [:test, :integration]}, - {:telemetry, "~>0.4.1"}, + {:assert_eventually, "~> 1.0", only: [:test, :integration]}, + {:mox, "~> 1.0", only: [:test, :integration]}, + {:telemetry, "~> 0.4.1"}, {:telemetry_metrics, "~> 0.5"}, {:telemetry_metrics_prometheus_core, "~> 0.4"}, {:telemetry_poller, "~> 0.5"}, - {:logfmt, "~>3.3"}, - {:stream_data, "~> 0.5", only: :test} + {:logfmt, "~> 3.3"}, + {:stream_data, "~> 0.5", only: [:test, :integration]} ] end @@ -155,10 +156,9 @@ defmodule MongoosePush.Mixfile do plt_core_path: ".dialyzer/", plt_add_apps: [:ex_unit, :mix], flags: [ - "-Wunmatched_returns", - "-Werror_handling", - "-Wrace_conditions", - "-Wunderspecs" + :unmatched_returns, + :error_handling, + :underspecs ] ] end @@ -180,9 +180,7 @@ defmodule MongoosePush.Mixfile do defp compilers(:integration), do: Mix.compilers() defp compilers(_) do - Mix.compilers() - |> List.delete(:erlang) - |> Enum.concat([:asn1, :erlang]) + [:asn1] ++ Mix.compilers() end defp aliases do @@ -191,8 +189,9 @@ defmodule MongoosePush.Mixfile do ] end - # All mix tasks are redundant in runtime, but we still need to compile `lib/mix/tasks/compile_asn1.ex` - # as it's required by build process (ASN1 compiler). + defp elixirc_options do + [warnings_as_errors: true] + end defp elixirc_paths(:prod), do: ["lib"] diff --git a/mix.lock b/mix.lock index 72f2407c..3b953abd 100644 --- a/mix.lock +++ b/mix.lock @@ -1,60 +1,66 @@ %{ "artificery": {:hex, :artificery, "0.4.3", "0bc4260f988dcb9dda4b23f9fc3c6c8b99a6220a331534fdf5bf2fd0d4333b02", [:mix], [], "hexpm", "12e95333a30e20884e937abdbefa3e7f5e05609c2ba8cf37b33f000b9ffc0504"}, - "assert_eventually": {:hex, :assert_eventually, "0.2.2", "469260936baf26fc72129e1f9ae71b96b29caacf6a49c5fa8157c8f923937e8d", [:mix], [{:ex_doc, ">= 0.0.0", [hex: :ex_doc, repo: "hexpm", optional: true]}], "hexpm", "0ad0f8647f66a2d1802e009f53d590c78336e7149da1a22635dff1c300494b59"}, + "asn1_compiler": {:hex, :asn1_compiler, "0.1.1", "64a4e52b59d1f225878445ace2c75cd2245b13a5a81182304fd9dc5acfc8994e", [:mix], [], "hexpm", "c250d24c22f1a3f305d88864400f9ac2df55c6886e1e3a030e2946efeb94695e"}, + "assert_eventually": {:hex, :assert_eventually, "1.0.0", "f1539f28ba3ffa99a712433c77723c7103986932aa341d05eee94c333a920d15", [:mix], [{:ex_doc, ">= 0.0.0", [hex: :ex_doc, repo: "hexpm", optional: true]}], "hexpm", "c658ac4103c8bd82d0cf72a2fdb77477ba3fbc6b15228c5c801003d239625c69"}, "bear": {:hex, :bear, "0.8.7", "16264309ae5d005d03718a5c82641fcc259c9e8f09adeb6fd79ca4271168656f", [:rebar3], [], "hexpm", "534217dce6a719d59e54fb0eb7a367900dbfc5f85757e8c1f94269df383f6d9b"}, - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"}, + "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, + "certifi": {:hex, :certifi, "2.5.3", "70bdd7e7188c804f3a30ee0e7c99655bc35d8ac41c23e12325f36ab449b70651", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "ed516acb3929b101208a9d700062d520f3953da3b6b918d866106ffa980e1c10"}, "chatterbox": {:git, "https://github.com/joedevivo/chatterbox.git", "1f4ce4f2133810313b182c3245427acc90eff9f8", [ref: "1f4ce4f"]}, - "confex": {:hex, :confex, "3.4.0", "8b1c3cc7a93320291abb31223a178df19d7f722ee816c05a8070c8c9a054560d", [:mix], [], "hexpm", "4a14e15185c772389979cf4c050ddcc7a25a4d62759da13a170e0ca7274a22c7"}, - "cowboy": {:hex, :cowboy, "2.7.0", "91ed100138a764355f43316b1d23d7ff6bdb0de4ea618cb5d8677c93a7a2f115", [:rebar3], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "04fd8c6a39edc6aaa9c26123009200fc61f92a3a94f3178c527b70b767c6e605"}, - "cowlib": {:hex, :cowlib, "2.8.0", "fd0ff1787db84ac415b8211573e9a30a3ebe71b5cbff7f720089972b2319c8a4", [:rebar3], [], "hexpm", "79f954a7021b302186a950a32869dbc185523d99d3e44ce430cd1f3289f41ed4"}, - "credo": {:hex, :credo, "0.10.2", "03ad3a1eff79a16664ed42fc2975b5e5d0ce243d69318060c626c34720a49512", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "539596b6774069260d5938aa73042a2f5157e1c0215aa35f5a53d83889546d14"}, - "dialyxir": {:hex, :dialyxir, "1.0.0", "6a1fa629f7881a9f5aaf3a78f094b2a51a0357c843871b8bc98824e7342d00a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "aeb06588145fac14ca08d8061a142d52753dbc2cf7f0d00fc1013f53f8654654"}, + "confex": {:hex, :confex, "3.5.0", "163857c73dd8f88a3815663f4bc00bee1b9c65daf40aa6e0d6ef272757fd22c7", [:mix], [], "hexpm", "34a9e31230c7fbb3dbe60db00341d0c84ee44ba3caf84b498f501c0bc8563570"}, + "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, + "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, + "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, + "credo": {:hex, :credo, "1.6.7", "323f5734350fd23a456f2688b9430e7d517afb313fbd38671b8a4449798a7854", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "41e110bfb007f7eda7f897c10bf019ceab9a0b269ce79f015d54b0dcf4fc7dd3"}, + "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, "distillery": {:hex, :distillery, "2.1.1", "f9332afc2eec8a1a2b86f22429e068ef35f84a93ea1718265e740d90dd367814", [:mix], [{:artificery, "~> 0.2", [hex: :artificery, repo: "hexpm", optional: false]}], "hexpm", "bbc7008b0161a6f130d8d903b5b3232351fccc9c31a991f8fcbf2a12ace22995"}, "earmark": {:hex, :earmark, "1.4.5", "62ffd3bd7722fb7a7b1ecd2419ea0b458c356e7168c1f5d65caf09b4fbdd13c8", [:mix], [], "hexpm", "b7d0e6263d83dc27141a523467799a685965bf8b13b6743413f19a7079843f4f"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.22.1", "9bb6d51508778193a4ea90fa16eac47f8b67934f33f8271d5e1edec2dc0eee4c", [:mix], [{:earmark, "~> 1.4.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "d957de1b75cb9f78d3ee17820733dc4460114d8b1e11f7ee4fd6546e69b1db60"}, - "excoveralls": {:hex, :excoveralls, "0.13.0", "4e1b7cc4e0351d8d16e9be21b0345a7e165798ee5319c7800b9138ce17e0b38e", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "fe2a56c8909564e2e6764765878d7d5e141f2af3bc8ff3b018a68ee2a218fced"}, + "ex_doc": {:hex, :ex_doc, "0.28.5", "3e52a6d2130ce74d096859e477b97080c156d0926701c13870a4e1f752363279", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d2c4b07133113e9aa3e9ba27efb9088ba900e9e51caa383919676afdf09ab181"}, + "excoveralls": {:hex, :excoveralls, "0.14.6", "610e921e25b180a8538229ef547957f7e04bd3d3e9a55c7c5b7d24354abbba70", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "0eceddaa9785cfcefbf3cd37812705f9d8ad34a758e513bb975b081dce4eb11e"}, + "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "goldrush": {:hex, :goldrush, "0.1.9", "f06e5d5f1277da5c413e84d5a2924174182fb108dabb39d5ec548b27424cd106", [:rebar3], [], "hexpm", "99cb4128cffcb3227581e5d4d803d5413fa643f4eb96523f77d9e6937d994ceb"}, "goth": {:hex, :goth, "1.1.0", "85977656822e54217bc0472666f1ce15dc3921495ef5f4f0774ef15503bae207", [:mix], [{:httpoison, "~> 0.11 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:joken, "~> 2.0", [hex: :joken, repo: "hexpm", optional: false]}], "hexpm", "d8d9e12fe744b5c91b6369a9b8f1da6682e80c95d204df35b376dac8a7211f2d"}, - "hackney": {:hex, :hackney, "1.16.0", "5096ac8e823e3a441477b2d187e30dd3fff1a82991a806b2003845ce72ce2d84", [:rebar3], [{:certifi, "2.5.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.1", [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]}, {:parse_trans, "3.3.0", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.6", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3bf0bebbd5d3092a3543b783bf065165fa5d3ad4b899b836810e513064134e18"}, + "hackney": {:hex, :hackney, "1.17.1", "08463f93d2cc1a03817bf28d8dae6021543f773bd436c9377047224856c4422c", [:rebar3], [{:certifi, "~>2.5", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "d2cba9e3c8103ad0320623e9f1c33e8d378a15eaabe2ee8ae441898f3d35a18c"}, "hpack": {:git, "https://github.com/joedevivo/hpack.git", "6b58b6231e9b6ab83096715120578976f72f4f7c", [tag: "0.2.3"]}, - "httpoison": {:hex, :httpoison, "1.6.2", "ace7c8d3a361cebccbed19c283c349b3d26991eff73a1eaaa8abae2e3c8089b6", [:mix], [{:hackney, "~> 1.15 and >= 1.15.2", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "aa2c74bd271af34239a3948779612f87df2422c2fdcfdbcec28d9c105f0773fe"}, - "idna": {:hex, :idna, "6.0.1", "1d038fb2e7668ce41fbf681d2c45902e52b3cb9e9c77b55334353b222c2ee50c", [:rebar3], [{:unicode_util_compat, "0.5.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a02c8a1c4fd601215bb0b0324c8a6986749f807ce35f25449ec9e69758708122"}, - "jason": {:hex, :jason, "1.2.1", "12b22825e22f468c02eb3e4b9985f3d0cb8dc40b9bd704730efa11abd2708c44", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b659b8571deedf60f79c5a608e15414085fa141344e2716fbd6988a084b5f993"}, - "joken": {:hex, :joken, "2.2.0", "2daa1b12be05184aff7b5ace1d43ca1f81345962285fff3f88db74927c954d3a", [:mix], [{:jose, "~> 1.9", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "b4f92e30388206f869dd25d1af628a1d99d7586e5cf0672f64d4df84c4d2f5e9"}, - "jose": {:hex, :jose, "1.10.1", "16d8e460dae7203c6d1efa3f277e25b5af8b659febfc2f2eb4bacf87f128b80a", [:mix, :rebar3], [], "hexpm", "3c7ddc8a9394b92891db7c2771da94bf819834a1a4c92e30857b7d582e2f8257"}, - "lager": {:hex, :lager, "3.8.0", "3402b9a7e473680ca179fc2f1d827cab88dd37dd1e6113090c6f45ef05228a1c", [:rebar3], [{:goldrush, "0.1.9", [hex: :goldrush, repo: "hexpm", optional: false]}], "hexpm", "f6cb541b688eab60730d8d286eb77256a5a9ad06eac10d43beaf55d07e68bbb6"}, - "logfmt": {:hex, :logfmt, "3.3.1", "d9eaf344f81f4b4a6f2a1c73d79cb9cb4c4ff1d7c878d7a1bf3cb92761f653db", [:mix], [], "hexpm", "5030c9dafe1ef85e416cc867cd8db836de512c54047735c7a3e7be0ba67a532e"}, + "httpoison": {:hex, :httpoison, "1.8.2", "9eb9c63ae289296a544842ef816a85d881d4a31f518a0fec089aaa744beae290", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "2bb350d26972e30c96e2ca74a1aaf8293d61d0742ff17f01e0279fef11599921"}, + "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, + "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, + "joken": {:hex, :joken, "2.5.0", "09be497d804b8115eb6f07615cef2e60c2a1008fb89dc0aef0d4c4b4609b99aa", [:mix], [{:jose, "~> 1.11.2", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "22b25c89617c5ed8ca7b31026340a25ea0f9ca7160f9706b79be9ed81fdf74e7"}, + "jose": {:hex, :jose, "1.11.2", "f4c018ccf4fdce22c71e44d471f15f723cb3efab5d909ab2ba202b5bf35557b3", [:mix, :rebar3], [], "hexpm", "98143fbc48d55f3a18daba82d34fe48959d44538e9697c08f34200fa5f0947d2"}, + "lager": {:hex, :lager, "3.9.2", "4cab289120eb24964e3886bd22323cb5fefe4510c076992a23ad18cf85413d8c", [:rebar3], [{:goldrush, "0.1.9", [hex: :goldrush, repo: "hexpm", optional: false]}], "hexpm", "7f904d9e87a8cb7e66156ed31768d1c8e26eba1d54f4bc85b1aa4ac1f6340c28"}, + "logfmt": {:hex, :logfmt, "3.3.3", "6521ee4a5c532088e15d487fab9f736c07bdd161d643560c73cd4b10685deb65", [:mix], [], "hexpm", "dbd51cd3fe37c3429b9bd687bad1f531a533505f4a641592129e7a47e24104d1"}, "logger_lager_backend": {:hex, :logger_lager_backend, "0.1.0", "4858d5ac26a3a6085274933bf8b3061973cadac4adbe8e0181933e8cece78abb", [:mix], [{:lager, "~> 3.2", [hex: :lager, repo: "hexpm", optional: false]}], "hexpm", "eb382bc640ee1bea62314db56c971517b1fe5700ef3e62edef13607143c0bfbf"}, - "makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"}, + "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, - "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm", "6cbe761d6a0ca5a31a0931bf4c63204bceb64538e664a8ecf784a9a6f3b875f1"}, + "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "mix_docker": {:hex, :mix_docker, "0.5.0", "c7ad34008c43d4a949d69721f39c4d2a2afc509c179926a683117ea8dff8af59", [:mix], [{:distillery, "~> 1.2", [hex: :distillery, repo: "hexpm", optional: false]}], "hexpm", "52bd4dc48e3adb5f38a67aab19b2026c384d5a75dc88d163cd363cdc7aa65cd9"}, - "mox": {:hex, :mox, "0.5.2", "55a0a5ba9ccc671518d068c8dddd20eeb436909ea79d1799e2209df7eaa98b6c", [:mix], [], "hexpm", "df4310628cd628ee181df93f50ddfd07be3e5ecc30232d3b6aadf30bdfe6092b"}, - "nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"}, - "open_api_spex": {:hex, :open_api_spex, "3.7.0", "04976db664c1d891c27df0649cf4d1c02a11769441a76e0a35edb42937ae9aa7", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 3.1", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm", "34dd83026ec6457393c48b0e585f455bab3ddb995688c78cbffd7025d7742bb4"}, - "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"}, - "phoenix": {:hex, :phoenix, "1.4.17", "1b1bd4cff7cfc87c94deaa7d60dd8c22e04368ab95499483c50640ef3bd838d8", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.8.1 or ~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a8e5d7a3d76d452bb5fb86e8b7bd115f737e4f8efe202a463d4aeb4a5809611"}, - "phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.2", "496c303bdf1b2e98a9d26e89af5bba3ab487ba3a3735f74bf1f4064d2a845a3e", [:mix], [], "hexpm", "1f13f9f0f3e769a667a6b6828d29dec37497a082d195cc52dbef401a9b69bf38"}, - "plug": {:hex, :plug, "1.10.3", "c9cebe917637d8db0e759039cc106adca069874e1a9034fd6e3fdd427fd3c283", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "01f9037a2a1de1d633b5a881101e6a444bcabb1d386ca1e00bb273a1f1d9d939"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.3.0", "149a50e05cb73c12aad6506a371cd75750c0b19a32f81866e1a323dda9e0e99d", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bc595a1870cef13f9c1e03df56d96804db7f702175e4ccacdb8fc75c02a7b97e"}, - "plug_crypto": {:hex, :plug_crypto, "1.1.2", "bdd187572cc26dbd95b87136290425f2b580a116d3fb1f564216918c9730d227", [:mix], [], "hexpm", "6b8b608f895b6ffcfad49c37c7883e8df98ae19c6a28113b02aa1e9c5b22d6b5"}, + "mox": {:hex, :mox, "1.0.2", "dc2057289ac478b35760ba74165b4b3f402f68803dd5aecd3bfd19c183815d64", [:mix], [], "hexpm", "f9864921b3aaf763c8741b5b8e6f908f44566f1e427b2630e89e9a73b981fef2"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, + "open_api_spex": {:hex, :open_api_spex, "3.12.0", "54ca6ab43561d06ae23dd54f670044a93b4e8e7434141bf59bbb47ba8ff46577", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 4.0 or ~> 5.0", [hex: :poison, repo: "hexpm", optional: true]}, {:ymlr, "~> 2.0", [hex: :ymlr, repo: "hexpm", optional: true]}], "hexpm", "a779959a3e8f18cdd8cbbec3e9d3544559d0428e26e8d6c44f0d2688faeabe08"}, + "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"}, + "phoenix": {:hex, :phoenix, "1.6.12", "f8f8ac077600f84419806dd53114b2e77aedde7a502e74181a7d886355aa0643", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 1.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2d6cf5583c9c20f7103c40e6014ef802d96553b8e5d6585ad6e627bd5ddb0d12"}, + "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.1", "ba04e489ef03763bf28a17eb2eaddc2c20c6d217e2150a61e3298b0f4c2012b5", [:mix], [], "hexpm", "81367c6d1eea5878ad726be80808eb5a787a23dee699f96e72b1109c57cdd8d9"}, + "phoenix_view": {:hex, :phoenix_view, "1.1.2", "1b82764a065fb41051637872c7bd07ed2fdb6f5c3bd89684d4dca6e10115c95a", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "7ae90ad27b09091266f6adbb61e1d2516a7c3d7062c6789d46a7554ec40f3a56"}, + "plug": {:hex, :plug, "1.13.6", "187beb6b67c6cec50503e940f0434ea4692b19384d47e5fdfd701e93cadb4cc2", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "02b9c6b9955bce92c829f31d6284bf53c591ca63c4fb9ff81dfd0418667a34ff"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.5.2", "62894ccd601cf9597e2c23911ff12798a8a18d237e9739f58a6b04e4988899fe", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ea6e87f774c8608d60c8d34022a7d073bd7680a0a013f049fc62bf35efea1044"}, + "plug_crypto": {:hex, :plug_crypto, "1.2.3", "8f77d13aeb32bfd9e654cb68f0af517b371fb34c56c9f2b58fe3df1235c1251a", [:mix], [], "hexpm", "b5672099c6ad5c202c45f5a403f21a3411247f164e4a8fab056e5cd8a290f4a2"}, "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"}, "pollution": {:hex, :pollution, "0.9.2", "3f67542631071c99f807d2a8f9da799c07cd983c902f5357b9e1569c20a26e76", [:mix], [], "hexpm", "6399fd8ffd97dcc3d9d277f60542a234d644d7bcc0d48c8fda93d6be4801bac2"}, "quixir": {:hex, :quixir, "0.9.3", "f01c37386b9e1d0526f01a8734a6d7884af294a0ec360f05c24c7171d74632bd", [:mix], [{:pollution, "~> 0.9.2", [hex: :pollution, repo: "hexpm", optional: false]}], "hexpm", "4f3a1fe7c82b767d935b3f7b94cf34b91ef78bb487ef256b303d77417fc7d589"}, - "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"}, + "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "sparrow": {:git, "https://github.com/esl/sparrow.git", "17605027cbafd32478c3a3d0cfcdd64bc1fc6ca1", [ref: "1760502"]}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, "stream_data": {:hex, :stream_data, "0.5.0", "b27641e58941685c75b353577dc602c9d2c12292dd84babf506c2033cd97893e", [:mix], [], "hexpm", "012bd2eec069ada4db3411f9115ccafa38540a3c78c4c0349f151fc761b9e271"}, - "telemetry": {:hex, :telemetry, "0.4.2", "2808c992455e08d6177322f14d3bdb6b625fbcfd233a73505870d8738a2f4599", [:rebar3], [], "hexpm", "2d1419bd9dda6a206d7b5852179511722e2b18812310d304620c7bd92a13fcef"}, - "telemetry_metrics": {:hex, :telemetry_metrics, "0.5.0", "1b796e74add83abf844e808564275dfb342bcc930b04c7577ab780e262b0d998", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "31225e6ce7a37a421a0a96ec55244386aec1c190b22578bd245188a4a33298fd"}, - "telemetry_metrics_prometheus_core": {:hex, :telemetry_metrics_prometheus_core, "0.4.0", "0860e53746f4554cf453a5217a3d2648a6d3a074ae01a21869a3963c54b1d5bc", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.5", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "912e4c4421477bfb930a19a8de5b2eb967c2700880698c6d80706b8bc32532bf"}, - "telemetry_poller": {:hex, :telemetry_poller, "0.5.0", "4770888ef85599ead39c7f51d6b4b62306e602d96c69b2625d54dea3d9a5204b", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69e4e8e65b0ae077c9e14cd5f42c7cc486de0e07ac6e3409e6f0e52699a7872c"}, + "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, + "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.1", "315d9163a1d4660aedc3fee73f33f1d355dcc76c5c3ab3d59e76e3edf80eef1f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7be9e0871c41732c233be71e4be11b96e56177bf15dde64a8ac9ce72ac9834c6"}, + "telemetry_metrics_prometheus_core": {:hex, :telemetry_metrics_prometheus_core, "0.4.2", "9c5b2cce20222f3c16256dcd6cfaf59d05a84dc664060ab938c6ac40e91d05e0", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.5", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "9cd707328a1971c886993f3e4b22c68835153efa674bf31a957b30439de9b258"}, + "telemetry_poller": {:hex, :telemetry_poller, "0.5.1", "21071cc2e536810bac5628b935521ff3e28f0303e770951158c73eaaa01e962a", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4cab72069210bc6e7a080cec9afffad1b33370149ed5d379b81c7c5f0c663fd4"}, "toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"}, - "unicode_util_compat": {:hex, :unicode_util_compat, "0.5.0", "8516502659002cec19e244ebd90d312183064be95025a319a6c7e89f4bccd65b", [:rebar3], [], "hexpm", "d48d002e15f5cc105a696cf2f1bbb3fc72b4b770a184d8420c8db20da2674b38"}, + "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "uuid": {:hex, :uuid, "1.1.8", "e22fc04499de0de3ed1116b770c7737779f226ceefa0badb3592e64d5cfb4eb9", [:mix], [], "hexpm", "c790593b4c3b601f5dc2378baae7efaf5b3d73c4c6456ba85759905be792f2ac"}, "worker_pool": {:hex, :worker_pool, "4.0.1", "8cdebce7e09ecb4f1eb4bbf78aa99248064ac357077668c011ac600599973723", [:rebar3], [], "hexpm", "b7e12a0d942d32ee135a199631d71d893c6bb24daf4c51b4af4952c411462d82"}, } diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index 270fc3d0..db6d8e5e 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -20,7 +20,9 @@ defmodule MongoosePushWeb.ConnCase do using do quote do # Import conveniences for testing with connections - use Phoenix.ConnTest + import Plug.Conn + import Phoenix.ConnTest + alias MongoosePushWeb.Router.Helpers, as: Routes # The default endpoint for testing diff --git a/test/support/mix/tasks/test_env/utils.ex b/test/support/mix/tasks/test_env/utils.ex index 28bde897..e7a074da 100644 --- a/test/support/mix/tasks/test_env/utils.ex +++ b/test/support/mix/tasks/test_env/utils.ex @@ -1,9 +1,7 @@ defmodule Mix.Tasks.Test.Env.Utils do def compose(compose_binary, opcode_args) do Mix.shell().info( - "Running `docker-compose #{Enum.join(opcode_args, " ")}` for: #{ - inspect(compose_files(Mix.env())) - }" + "Running `docker-compose #{Enum.join(opcode_args, " ")}` for: #{inspect(compose_files(Mix.env()))}" ) compose_args = base_compose_args() ++ opcode_args ++ ["--remove-orphans"] @@ -79,7 +77,9 @@ defmodule Mix.Tasks.Test.Env.Utils do defp try_connect(proto, host, port) do url = "#{proto}://#{host}:#{port}/" - with {:ok, _} <- HTTPoison.get(url, [], hackney: [:insecure]) do + # TODO remove once we're on OTP >= 24.3.4.5, workaround for https://github.com/erlang/otp/issues/6241 + with {:ok, _} <- + HTTPoison.get(url, [], ssl: [middlebox_comp_mode: false, verify: :verify_none]) do :ok end end diff --git a/test/unit/api/v2_apns_test.exs b/test/unit/api/v2_apns_test.exs index 96496fd3..3475d1bc 100644 --- a/test/unit/api/v2_apns_test.exs +++ b/test/unit/api/v2_apns_test.exs @@ -14,7 +14,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 400, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns with bad certificate fails" do @@ -22,7 +22,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 403, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns with bad path fails" do @@ -30,7 +30,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 404, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns with bad method fails" do @@ -38,7 +38,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 405, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns with unregistered token fails" do @@ -46,7 +46,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 410, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns with too large payload fails" do @@ -54,7 +54,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 413, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns fails with unknown internal error" do @@ -62,7 +62,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 500, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns fails with too many requests" do @@ -70,7 +70,7 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 429, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end test "push to apns fails when service is unavailable/overloaded" do @@ -78,6 +78,6 @@ defmodule MongoosePush.API.V2APNSTest do Tools.mock_apns([%{device_token: "f534534543", status: 503, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:apns)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:apns)) end end diff --git a/test/unit/api/v2_fcm_test.exs b/test/unit/api/v2_fcm_test.exs index 07b67d7c..fcaf1cc0 100644 --- a/test/unit/api/v2_fcm_test.exs +++ b/test/unit/api/v2_fcm_test.exs @@ -14,7 +14,7 @@ defmodule MongoosePush.API.V2FCMTest do Tools.mock_fcm("/error-tokens", [%{device_token: "f534534543", status: 404, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:fcm)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:fcm)) end test "push to fcm with id mismatch fails" do @@ -22,7 +22,7 @@ defmodule MongoosePush.API.V2FCMTest do Tools.mock_fcm("/error-tokens", [%{device_token: "f534534543", status: 403, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:fcm)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:fcm)) end test "push to fcm with the limit exceeded fails" do @@ -30,7 +30,7 @@ defmodule MongoosePush.API.V2FCMTest do Tools.mock_fcm("/error-tokens", [%{device_token: "f534534543", status: 429, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:fcm)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:fcm)) end test "push to fcm fails with unknown internal error" do @@ -38,7 +38,7 @@ defmodule MongoosePush.API.V2FCMTest do Tools.mock_fcm("/error-tokens", [%{device_token: "f534534543", status: 500, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:fcm)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:fcm)) end test "push to fcm with invalid or missing certificate/web push fails" do @@ -46,7 +46,7 @@ defmodule MongoosePush.API.V2FCMTest do Tools.mock_fcm("/error-tokens", [%{device_token: "f534534543", status: 401, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:fcm)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:fcm)) end test "push to fcm fails when service is unavailable/overloaded" do @@ -54,6 +54,6 @@ defmodule MongoosePush.API.V2FCMTest do Tools.mock_fcm("/error-tokens", [%{device_token: "f534534543", status: 503, reason: reason}]) - assert {500, %{"details" => reason}} = Tools.post(@url, Tools.sample_notification(:fcm)) + assert {500, %{"details" => reason}} == Tools.post(@url, Tools.sample_notification(:fcm)) end end diff --git a/test/unit/logger_formatter_test.exs b/test/unit/logger_formatter_test.exs index c27789d9..7fd96d26 100644 --- a/test/unit/logger_formatter_test.exs +++ b/test/unit/logger_formatter_test.exs @@ -5,13 +5,7 @@ defmodule MongoosePush.LoggerFormatterTest do describe "format/4" do setup do - {date, time} = - :millisecond - |> System.system_time() - |> :calendar.system_time_to_universal_time(:millisecond) - %{ - date_time: {date, Tuple.append(time, 0)}, severity: Enum.random(["info", "debug", "error", "warn"]), what: "Something", pid: self() @@ -19,7 +13,6 @@ defmodule MongoosePush.LoggerFormatterTest do end test "prints logs in JSON format", %{ - date_time: date_time, severity: severity, what: what, pid: pid @@ -28,16 +21,16 @@ defmodule MongoosePush.LoggerFormatterTest do %{ "application" => "mongoose_push", "at" => "Module.function/1:1", - "pid" => pid, + "pid" => inspect(pid), "severity" => severity, "text" => "Some random message", "what" => what, - "when" => date_time - }} = + "when" => "2022-09-08T09:23:14.001" + }} == JSON.format( String.to_atom(severity), "Some random message", - date_time, + {{2022, 09, 08}, {09, 23, 14, 001}}, application: :mongoose_push, time: :os.system_time(), pid: pid, @@ -50,7 +43,6 @@ defmodule MongoosePush.LoggerFormatterTest do end test "prints logs in logfmt format", %{ - date_time: date_time, severity: severity, what: what, pid: pid @@ -58,16 +50,16 @@ defmodule MongoosePush.LoggerFormatterTest do assert %{ "application" => "mongoose_push", "at" => "Module.function/1:1", - "pid" => pid, + "pid" => inspect(pid), "severity" => severity, "text" => "Some random message", "what" => what, - "when" => date_time - } = + "when" => "2022-09-08T09:25:07.002" + } == LogFmt.format( String.to_atom(severity), "Some random message", - date_time, + {{2022, 09, 08}, {09, 25, 07, 002}}, application: :mongoose_push, time: :os.system_time(), pid: pid, diff --git a/test/unit/mongoose_push_runtime_test.exs b/test/unit/mongoose_push_runtime_test.exs index 6f4c0ebe..d21492b8 100644 --- a/test/unit/mongoose_push_runtime_test.exs +++ b/test/unit/mongoose_push_runtime_test.exs @@ -6,26 +6,6 @@ defmodule MongoosePushRuntimeTest do end test "tls ciphers required by apns are available" do - # APNS supports only: - # - ECDHE-RSA-AES128-GCM-SHA256 - # - ECDHE-RSA-AES256-GCM-SHA384 - - all_ciphers = :ssl.cipher_suites() - - apns_ciphers = - Enum.filter(all_ciphers, fn cipher -> - case cipher do - {:ecdhe_rsa, :aes_128_gcm, _, :sha256} -> - true - - {:ecdhe_rsa, :aes_256_gcm, _, :sha384} -> - true - - _ -> - false - end - end) - - assert length(apns_ciphers) > 0 + assert :ok == MongoosePush.Application.check_apns_ciphers() end end diff --git a/test/unit/mongoose_push_telemetry_metrics_test.exs b/test/unit/mongoose_push_telemetry_metrics_test.exs index 82586e70..317f8614 100644 --- a/test/unit/mongoose_push_telemetry_metrics_test.exs +++ b/test/unit/mongoose_push_telemetry_metrics_test.exs @@ -3,7 +3,6 @@ defmodule MongoosePushTelemetryMetricsTest do use AssertEventually require Integer import Mox - import MongoosePush alias MongoosePush.Service.APNS alias MongoosePush.Service.FCM diff --git a/test/unit/test_helper.exs b/test/unit/test_helper.exs index a8bdb0b1..4d76933f 100644 --- a/test/unit/test_helper.exs +++ b/test/unit/test_helper.exs @@ -1,2 +1,4 @@ +Code.put_compiler_option(:warnings_as_errors, true) + ExUnit.start(capture_log: true) Mox.defmock(MongoosePush.Service.Mock, for: MongoosePush.Service)