diff options
Diffstat (limited to 'test/tasks')
-rw-r--r-- | test/tasks/config_test.exs | 4 | ||||
-rw-r--r-- | test/tasks/ecto/ecto_test.exs | 4 | ||||
-rw-r--r-- | test/tasks/ecto/rollback_test.exs | 4 | ||||
-rw-r--r-- | test/tasks/instance_test.exs (renamed from test/tasks/instance.exs) | 19 | ||||
-rw-r--r-- | test/tasks/pleroma_test.exs | 4 | ||||
-rw-r--r-- | test/tasks/robots_txt_test.exs | 6 |
6 files changed, 38 insertions, 3 deletions
diff --git a/test/tasks/config_test.exs b/test/tasks/config_test.exs index 83a363356..bbcc57217 100644 --- a/test/tasks/config_test.exs +++ b/test/tasks/config_test.exs @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Mix.Tasks.Pleroma.ConfigTest do use Pleroma.DataCase alias Pleroma.Repo diff --git a/test/tasks/ecto/ecto_test.exs b/test/tasks/ecto/ecto_test.exs index b48662c88..a1b9ca174 100644 --- a/test/tasks/ecto/ecto_test.exs +++ b/test/tasks/ecto/ecto_test.exs @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Mix.Tasks.Pleroma.EctoTest do use ExUnit.Case, async: true diff --git a/test/tasks/ecto/rollback_test.exs b/test/tasks/ecto/rollback_test.exs index 33d093fca..c33c4e940 100644 --- a/test/tasks/ecto/rollback_test.exs +++ b/test/tasks/ecto/rollback_test.exs @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do use Pleroma.DataCase import ExUnit.CaptureLog diff --git a/test/tasks/instance.exs b/test/tasks/instance_test.exs index 1875f52a3..70986374e 100644 --- a/test/tasks/instance.exs +++ b/test/tasks/instance_test.exs @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.InstanceTest do use ExUnit.Case, async: true @@ -38,7 +42,17 @@ defmodule Pleroma.InstanceTest do "--indexable", "y", "--db-configurable", - "y" + "y", + "--rum", + "y", + "--listen-port", + "4000", + "--listen-ip", + "127.0.0.1", + "--uploads-dir", + "test/uploads", + "--static-dir", + "instance/static/" ]) end @@ -56,10 +70,11 @@ defmodule Pleroma.InstanceTest do assert generated_config =~ "username: \"dbuser\"" assert generated_config =~ "password: \"dbpass\"" assert generated_config =~ "dynamic_configuration: true" + assert generated_config =~ "http: [ip: {127, 0, 0, 1}, port: 4000]" assert File.read!(tmp_path() <> "setup.psql") == generated_setup_psql() end defp generated_setup_psql do - ~s(CREATE USER dbuser WITH ENCRYPTED PASSWORD 'dbpass';\nCREATE DATABASE dbname OWNER dbuser;\n\\c dbname;\n--Extensions made by ecto.migrate that need superuser access\nCREATE EXTENSION IF NOT EXISTS citext;\nCREATE EXTENSION IF NOT EXISTS pg_trgm;\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\n) + ~s(CREATE USER dbuser WITH ENCRYPTED PASSWORD 'dbpass';\nCREATE DATABASE dbname OWNER dbuser;\n\\c dbname;\n--Extensions made by ecto.migrate that need superuser access\nCREATE EXTENSION IF NOT EXISTS citext;\nCREATE EXTENSION IF NOT EXISTS pg_trgm;\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\nCREATE EXTENSION IF NOT EXISTS rum;\n) end end diff --git a/test/tasks/pleroma_test.exs b/test/tasks/pleroma_test.exs index e236ccbbb..a20bd9cf2 100644 --- a/test/tasks/pleroma_test.exs +++ b/test/tasks/pleroma_test.exs @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Mix.PleromaTest do use ExUnit.Case, async: true import Mix.Pleroma diff --git a/test/tasks/robots_txt_test.exs b/test/tasks/robots_txt_test.exs index 539193f73..78a3f17b4 100644 --- a/test/tasks/robots_txt_test.exs +++ b/test/tasks/robots_txt_test.exs @@ -1,5 +1,9 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Mix.Tasks.Pleroma.RobotsTxtTest do - use ExUnit.Case, async: true + use ExUnit.Case alias Mix.Tasks.Pleroma.RobotsTxt test "creates new dir" do |