Some quick thoughts on Unit Testing ActivityPub
5 points by hongminhee
5 points by hongminhee
I hate to say it, but Edent is propagating what Mastodon considers ActivityPub which has only a passing relation to the actual specification.
I wish people would implement the specification in its entirety, not just the parts that gets them compatible with Mastodon. That includes the client to server parts and that includes things that Mastodon fully doesn't support (Activities with multiple Objects and Actors, etc)
If anyone is curious about how that would look, I have implemented a reasonably large test-suite for my FedBOX project.
Thanks for letting me know. I've worked hard to ensure that my ActivityBot stuff works with MissKey, Pleroma, and others. I'm unsure which bits you think are Mastodon only? I'd certainly be keen to expand compatibility.
I was talking specifically about the limitations that Mastodon enforces onto the rest of the fediverse that wants to be compatible with them by outright rejecting the ActivityPub documents that have one of these:
inReplyTo with more than one single thing.attributedTo with more than one single thing.actor with more than one single thing.object with more than one single thing.Then there are the slightly less offensive issues - which don't result in an outright rejection:
Note
These I can remember on the top of my head, I've always wanted to create a Mastodon quirks list, but somehow never got to it.
Also, something that tickled my pedantry bone, and I'm not sure if it's just a simplification for the purpose of writing the article, but WebFinger and HTTP-Signatures are not part of ActivityPub, even though they're used in the fediverse.
In the documentation of my implementation, I've taken a habit of calling this a «mastodon-like AP». I kind of don't care for the whole spec and I don't consider it very good. What I care about is being compatible with other implementations, and if that requires gathering around another subpar maypole, so be it
The ecosystem has ossified around a twitter-like model anyway, and that domain really doesn't allow multiple subjects and objects in one event. If your domain representation can't support it, what does one do with the protocol that imposes what you can't do? Ignoring the unconfortable parts is the only way
P.S. you might want to also add the mastodon client api that some «activitypub» «integrations» require your server to have
only partially related, I find the general state of affairs in regard of tests miserable.
Every effort is worth to be praised.
Problems started with https://www.w3.org/TR/activitypub/#:~:text=Test%20suite having not a single day of operation AFAIK, the same holds for project-related tests. Usually they depend on complex, brittle stacks.
No test suite at the standard, no reference implementation, no server implementors' habit of providing testable endpoints.
Tests being a service to the community deserve more love, federation requires diverse implementations cooperating.