Add test for comment federation on cached posts#639
Merged
Conversation
Contributor
Test this PR in WordPress PlaygroundYou can test this pull request directly in WordPress Playground: This will install and activate the plugin with the changes from this PR. |
…b tests in CI The CI was skipping all ActivityPub-related tests because the plugin wasn't available. This adds a checkout step for the ActivityPub plugin and a new test that verifies commenting on a cached friend post produces the correct inReplyTo URL for federation.
actions/checkout doesn't allow paths outside the workspace, so checkout inside and symlink to the sibling directory the bootstrap expects.
doctrine/instantiator 2.1.0 uses PHP 8.3 typed constants, so the ActivityPub tests can only run on PHP 8.3+.
The ActivityPub tests use mastodon.local as the actor host, but it was missing from the friends_host_is_valid allowlist. This was never caught because without the AP plugin loaded, set_up() skips early. With AP loaded in CI, save_feed() rejects the URL as invalid.
5d6bb5b to
b079a09
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automattic/wordpress-activitypubas a sibling directory — allActivityPubTesttests were previously skippedtest_comment_on_cached_post_federation()to verify that commenting on a cachedfriend_post_cachepost produces the correct remoteinReplyToURL for ActivityPub federationmastodon.localmissing from the test host allowlist, which caused all AP test feed creation to silently failTest plan
get_permalink()returns the remote GUID,should_comment_be_federated()returns true, and the transformer'sinReplyTomatches the remote URLChangelog
Type
Message
Add ActivityPub integration tests to CI and test for comment federation on cached posts.