-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPNS format keys in b36cid #7554
Conversation
To run sharness locally, during dev, run this from the test/sharness dir:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need more sharness tests here. In particular we should
- Like with the previous PR, have a function that will let us test that Ed25519 + RSA keys both work (it's not quite in line with this PR but we need to do it anyway
- Make sure that we can publish using a b58mh as well as a b36cid. The results can all come out as
Publish to ${b36cidKey}
though.
I've added a test for (2). For (1), it seems one good strategy is to wrap all tests in a function parameterized by ed25519/rsa and use this to initialize the self ID, because most tests are based on the self id. Would you prefer a different approach? |
We need to test publishing with the
|
I think now all these cases are covered. |
test/sharness/t0100-name.sh
Outdated
test_expect_success "generate and verify a new key" ' | ||
B58MH_ID=`ipfs key list -f=b58mh -l | grep self | cut -d " " -f1` && | ||
B36CID_ID=`ipfs key list -f=b36cid -l | grep self | cut -d " " -f1` && | ||
test_check_peerid "${B58MH_ID}" && | ||
test_check_peerid "${B36CID_ID}" | ||
' | ||
|
||
test_expect_success "'ipfs name publis --allow-offline --key=<peer-id> <hash>' succeeds" ' | ||
ipfs name publish --allow-offline --key=${B58MH_ID} "/ipfs/$HASH_WELCOME_DOCS" >b58mh_published_id && | ||
ipfs name publish --allow-offline --key=${B36CID_ID} "/ipfs/$HASH_WELCOME_DOCS" >b36cid_published_id | ||
' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code tests publishing with the self
key which what is tested in the other function test_name_with_self
. Did you mean to use the generated key here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No: This test is focused on using an explicit key. Moved it to test_name_with_self.
1af19d3
to
92e2133
Compare
26ce3a0
to
e384b59
Compare
No description provided.