From 4169db1e7386da8ffadcbbcec80e5a8232c9217c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 7 Jun 2021 17:41:50 +0200 Subject: [PATCH] Move from the mdillon postgis image to postgis/postgis Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 9 +++++---- test/service/metadata/metadata_test.exs | 26 +++++++++++++------------ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d30fde87..2e145e373 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ variables: # DB Variables for Postgres / Postgis POSTGRES_DB: mobilizon_test POSTGRES_USER: postgres - POSTGRES_PASSWORD: "" + POSTGRES_PASSWORD: postgres POSTGRES_HOST: postgres # DB Variables for Mobilizon MOBILIZON_DATABASE_USERNAME: $POSTGRES_USER @@ -104,11 +104,12 @@ exunit-1.11: stage: test image: tcitworld/mobilizon-ci:legacy services: - - name: mdillon/postgis:11 + - name: postgis/postgis:11-3.0 alias: postgres variables: MIX_ENV: test before_script: + - mix deps.clean --all - mix deps.get - mix ecto.create - mix ecto.migrate @@ -119,7 +120,7 @@ exunit-1.11: exunit: stage: test services: - - name: mdillon/postgis:13 + - name: postgis/postgis:13-3.1 alias: postgres variables: MIX_ENV: test @@ -156,7 +157,7 @@ jest: # cypress: # stage: test # services: -# - name: mdillon/postgis:11 +# - name: postgis/postgis:13.3 # alias: postgres # variables: # MIX_ENV=e2e diff --git a/test/service/metadata/metadata_test.exs b/test/service/metadata/metadata_test.exs index 541668dca..290a8a307 100644 --- a/test/service/metadata/metadata_test.exs +++ b/test/service/metadata/metadata_test.exs @@ -14,16 +14,18 @@ defmodule Mobilizon.Service.MetadataTest do test "that is a group gives tags" do %Actor{} = group = insert(:group, name: "My group") - # {group.name} (@#{group.preferred_username})" property="og:title">" assert group |> Metadata.build_tags() |> Metadata.Utils.stringify_tags() == - " + """) - # {group.name} (@#{group.preferred_username})" property="og:title">" assert group |> Map.put(:avatar, nil) |> Metadata.build_tags() |> Metadata.Utils.stringify_tags() == - " + """) end test "that is not a group doesn't give anything" do @@ -47,17 +49,17 @@ defmodule Mobilizon.Service.MetadataTest do assert event |> Metadata.build_tags() |> Metadata.Utils.stringify_tags() == - """ + String.trim(""" #{event.title} - Mobilizon - """ + """) assert event |> Map.put(:picture, nil) |> Metadata.build_tags() |> Metadata.Utils.stringify_tags() == - """ + String.trim(""" #{event.title} - Mobilizon - """ + """) end end @@ -68,9 +70,9 @@ defmodule Mobilizon.Service.MetadataTest do assert post |> Metadata.build_tags() |> Metadata.Utils.stringify_tags() == - """ + String.trim(""" - """ + """) end end @@ -81,9 +83,9 @@ defmodule Mobilizon.Service.MetadataTest do assert comment |> Metadata.build_tags() |> Metadata.Utils.stringify_tags() == - """ + String.trim(""" - """ + """) end end