Skip to content
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

repeat gateway subdomain test for all key types #7542

Merged
merged 8 commits into from Jul 20, 2020
Merged

Conversation

petar
Copy link
Contributor

@petar petar commented Jul 15, 2020

No description provided.

Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

Rerunning the whole test twice seems like overkill (also Github makes it difficult to do the diff). Also, it makes it sort of a pain to figure out where the error is since you have to figure out which loop it's running through to identify your test error, it's not the end of the world but also fairly avoidable here,

We just need to duplicate all the places where we test IPNS_IDv0, IPNS_IDv1, and I guess IPNS_IDv1_DAGPB twice to use IPNS_IDv{X}RSA and IPNS_IDv{X} Ed25519.

RSA_KEY=$(ipfs key gen -f=b58mh --type=rsa --size=2048 test_key_rsa | head -n1 | tr -d "\n")
RSA_IPNS_IDv0=$(echo "$RSA_KEY" | ipfs cid format -v 0)
RSA_IPNS_IDv1=$(echo "$RSA_KEY" | ipfs cid format -v 1 --codec libp2p-key -b base36)
RSA_IPNS_IDv1_DAGPB=$(echo "$RSA_IPNS_IDv0" | ipfs cid format -v 1 -b base36)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the "ipfs cid" command have a "--codec protobuf" flag like below?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not necessary since when --codec isn't specified it leaves the codec alone and the codec for cidv0 (which RSA keys are) is always DagPB.

I'm not sure whether making this more solid by adding --codec protobuf would make us more or less likely to catch errors.

@aschmahmann aschmahmann merged commit 6eb5db7 into master Jul 20, 2020
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
@hacdias hacdias deleted the petar/sharfix branch May 9, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants