From 8076deeeb4547ff0878978bcbcfc4d2789f636c7 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 7 Nov 2023 16:00:13 -0500 Subject: [PATCH 1/3] Activate test for object validator that has not been running --- .../{bare_uri_test.ex => bare_uri_test.exs} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename test/pleroma/ecto_type/activity_pub/object_validators/{bare_uri_test.ex => bare_uri_test.exs} (82%) diff --git a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.ex b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs similarity index 82% rename from test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.ex rename to test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs index 226383c3c..8664f7b28 100644 --- a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.ex +++ b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs @@ -6,15 +6,16 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest do use Pleroma.DataCase, async: true alias Pleroma.EctoType.ActivityPub.ObjectValidators.BareUri + alias Pleroma.EctoType.ActivityPub.ObjectValidators.SafeText test "diaspora://" do text = "diaspora://alice@fediverse.example/post/deadbeefdeadbeefdeadbeefdeadbeef" - assert {:ok, text} = BareUri.cast(text) + assert {:ok, ^text} = BareUri.cast(text) end test "nostr:" do text = "nostr:note1gwdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" - assert {:ok, text} = BareUri.cast(text) + assert {:ok, ^text} = BareUri.cast(text) end test "errors for non-URIs" do From 76c070fe8641f5519ca42dfcecdab3f47d882e8f Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 8 Nov 2023 00:28:26 +0100 Subject: [PATCH 2/3] ObjectValidators.BareUriTest: Replace calls of SafeText to BareUri --- changelog.d/bare_uri_test.skip | 0 .../activity_pub/object_validators/bare_uri_test.exs | 7 +++---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 changelog.d/bare_uri_test.skip diff --git a/changelog.d/bare_uri_test.skip b/changelog.d/bare_uri_test.skip new file mode 100644 index 000000000..e69de29bb diff --git a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs index 8664f7b28..760ecb465 100644 --- a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs +++ b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs @@ -6,7 +6,6 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest do use Pleroma.DataCase, async: true alias Pleroma.EctoType.ActivityPub.ObjectValidators.BareUri - alias Pleroma.EctoType.ActivityPub.ObjectValidators.SafeText test "diaspora://" do text = "diaspora://alice@fediverse.example/post/deadbeefdeadbeefdeadbeefdeadbeef" @@ -19,8 +18,8 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest do end test "errors for non-URIs" do - assert :error == SafeText.cast(1) - assert :error == SafeText.cast("foo") - assert :error == SafeText.cast("foo bar") + assert :error == BareUri.cast(1) + assert :error == BareUri.cast("foo") + assert :error == BareUri.cast("foo bar") end end From e1bc95ae6eb7a5474433a25268617277b3c9e85b Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 3 Jun 2023 14:03:51 -0400 Subject: [PATCH 3/3] Support a type called "change" --- tools/check-changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check-changelog b/tools/check-changelog index 60692033f..64e59ae7f 100644 --- a/tools/check-changelog +++ b/tools/check-changelog @@ -6,7 +6,7 @@ git remote add upstream https://git.pleroma.social/pleroma/pleroma.git git fetch upstream ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}:refs/remotes/upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME git diff --raw --no-renames upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD -- changelog.d | \ - grep ' A\t' | grep '\.\(skip\|add\|remove\|fix\|security\)$' + grep ' A\t' | grep '\.\(skip\|add\|remove\|fix\|security|change\)$' ret=$? if [ $ret -eq 0 ]; then