Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: test for subscribers to ipns pubsub topic (#584)
IPNS interop tests for helia→pubsub→kubo did not execute the same tests as kubo→pubsub→helia. Namely, publishing to IPNS was executed with assumption it will fail, as a convoluted way of confirming the kubo is not subscribed to the topic, and also kubo connectivity state is somehow taken on belief, rather than being programmatically verified: ```js // first publish should fail because kubo isn't subscribed to key update channel await expect(name.publish(peerId, cid)).to.eventually.be.rejected() .with.property('message', 'PublishError.NoPeersSubscribedToTopic') // should fail to resolve the first time as kubo was not subscribed to the pubsub channel await expect(last(kubo.api.name.resolve(peerId, { timeout: 100 }))).to.eventually.be.undefined() ``` Good news is that there are native APIs for inspecting subsub topic subscriptions, and this PR refactors test to use them and have tests in both directions do more-or-less the same thing with the same asserts. This should make interop less brittle. ipfs/kubo#10488 (comment)
- Loading branch information