Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Aug 12, 2020
1 parent 4121c12 commit f2fba11
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmd/ipfs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
algorithmDefault = options.RSAKey
algorithmDefault = options.Ed25519Key
algorithmOptionName = "algorithm"
bitsOptionName = "bits"
emptyRepoOptionName = "empty-repo"
Expand Down
2 changes: 1 addition & 1 deletion core/commands/keystore.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var keyGenCmd = &cmds.Command{
Tagline: "Create a new keypair",
},
Options: []cmds.Option{
cmds.StringOption(keyStoreTypeOptionName, "t", "type of the key to create: rsa, ed25519").WithDefault("rsa"),
cmds.StringOption(keyStoreTypeOptionName, "t", "type of the key to create: rsa, ed25519").WithDefault("ed25519"),
cmds.IntOption(keyStoreSizeOptionName, "s", "size of the key to generate"),
cmds.StringOption(keyFormatOptionName, "", "Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}.").WithDefault("base36"),
},
Expand Down
12 changes: 6 additions & 6 deletions test/sharness/t0020-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ test_ipfs_init_flags() {
ipfs init --algorithm=ed25519 --empty-repo >actual_init
;;
*)
ipfs init --bits="$RSA_BITS" --empty-repo >actual_init
ipfs init --empty-repo >actual_init
;;
esac
'
Expand Down Expand Up @@ -166,7 +166,7 @@ test_ipfs_init_flags() {
test_cmp ed25519_expected actual_init
;;
*)
test_cmp rsa_expected actual_init
test_cmp ed25519_expected actual_init
;;
esac
'
Expand All @@ -190,14 +190,14 @@ test_ipfs_init_flags ''
# test init profiles
test_expect_success "'ipfs init --profile' with invalid profile fails" '
RSA_BITS="2048" &&
test_must_fail ipfs init --bits="$RSA_BITS" --profile=nonexistent_profile 2> invalid_profile_out
test_must_fail ipfs init --profile=nonexistent_profile 2> invalid_profile_out
EXPECT="Error: invalid configuration profile: nonexistent_profile" &&
grep "$EXPECT" invalid_profile_out
'

test_expect_success "'ipfs init --profile' succeeds" '
RSA_BITS="2048" &&
ipfs init --bits="$RSA_BITS" --profile=server
ipfs init --profile=server
'

test_expect_success "'ipfs config Swarm.AddrFilters' looks good" '
Expand All @@ -211,7 +211,7 @@ test_expect_success "clean up ipfs dir" '

test_expect_success "'ipfs init --profile=test' succeeds" '
RSA_BITS="2048" &&
ipfs init --bits="$RSA_BITS" --profile=test
ipfs init --profile=test
'

test_expect_success "'ipfs config Bootstrap' looks good" '
Expand Down Expand Up @@ -244,7 +244,7 @@ test_expect_success "clean up ipfs dir" '

test_expect_success "'ipfs init --profile=lowpower' succeeds" '
RSA_BITS="2048" &&
ipfs init --bits="$RSA_BITS" --profile=lowpower
ipfs init --profile=lowpower
'

test_expect_success "'ipfs config Discovery.Routing' looks good" '
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0022-init-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test_expect_success "ipfs init succeeds" '
export IPFS_PATH="$(pwd)/.ipfs" &&
echo "IPFS_PATH: \"$IPFS_PATH\"" &&
BITS="2048" &&
ipfs init --bits="$BITS" >actual_init ||
ipfs init >actual_init ||
test_fsh cat actual_init
'

Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0025-datastores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test_description="Test non-standard datastores"

test_expect_success "'ipfs init --profile=badgerds' succeeds" '
BITS="2048" &&
ipfs init --bits="$BITS" --profile=badgerds
ipfs init --profile=badgerds
'

test_expect_success "'ipfs pin ls' works" '
Expand Down

0 comments on commit f2fba11

Please sign in to comment.