Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

test: basic routing interface test #103

Merged
merged 2 commits into from
Feb 9, 2023
Merged

test: basic routing interface test #103

merged 2 commits into from
Feb 9, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Feb 8, 2023

Adds missing tests from #91. The tests depend on other APIs. Feel free to suggest improvements to depend less on others. PR in Kubo with this commit: ipfs/kubo#9628


Also, while doing this, I realised that the interface we added for the routing API might not be the most intuitive: see #104.

Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +87 to +91
// Put routing value.
err = apis[0].Routing().Put(ctx, "/ipns/"+ipnsEntry.Name(), data)
if err != nil {
t.Fatal(err)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if we would try to fetch the thing we stored, this would catch silent failure, with the current setup that would not work since you don't know if this was stored by the original ipns publish or the second put.

Copy link
Member Author

@hacdias hacdias Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jorropo i can do that too. I didn't do it initially for illustration purposes since I didn't want to be adding random things.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jorropo actually, I think there must be some kind of internal verification afterwards. If you do ipfs routing put and then get, you won't get the same result. For example, if you put random data on your self key, you'll just get the latest ipns key. So I think there's some DHT verification somewhere to avoid invalid data to getting added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jorropo
Copy link
Contributor

Jorropo commented Feb 8, 2023

that enough to make progress on ipfs/go-ipfs-http-client#168, ty 🎉

@github-actions
Copy link

github-actions bot commented Feb 8, 2023

Suggested version: v0.11.0

Comparing to: v0.10.0 (diff)

Changes in go.mod file(s):

diff --git a/go.mod b/go.mod
index af97472..2688cf3 100644
--- a/go.mod
+++ b/go.mod
@@ -66,4 +66,4 @@ require (
 	lukechampine.com/blake3 v1.1.7 // indirect
 )
 
-go 1.18
+go 1.19

gorelease says:

# diagnostics
required module github.com/microcosm-cc/[email protected] retracted by module author: Retract older versions as only latest is to be depended upon

# summary
Suggested version: v0.11.0

gocompat says:

Your branch is up to date with 'origin/master'.

Cutting a Release (and modifying non-markdown files)

This PR is modifying both version.json and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to master. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

@hacdias hacdias merged commit 0783b37 into master Feb 9, 2023
@hacdias hacdias deleted the test/routing branch February 9, 2023 06:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants