Skip to content

Commit

Permalink
Fix more sharness tests
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Navarro Perez <[email protected]>
  • Loading branch information
ajnavarro committed Dec 2, 2022
1 parent 39d10ea commit 0bff00e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/sharness/t0021-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ test_config_cmd() {

test_expect_success "'ipfs config Swarm.AddrFilters' looks good" '
ipfs config Swarm.AddrFilters > actual_config &&
test $(cat actual_config | wc -l) = 1
test $(cat actual_config | wc -l) = 2
'

test_expect_success "copy ipfs config" '
Expand All @@ -218,7 +218,7 @@ test_config_cmd() {

test_expect_success "'ipfs config Swarm.AddrFilters' looks good with server profile" '
ipfs config Swarm.AddrFilters > actual_config &&
test $(cat actual_config | wc -l) = 18
test $(cat actual_config | wc -l) = 19
'

test_expect_success "'ipfs config profile apply local-discovery' works" '
Expand All @@ -227,7 +227,7 @@ test_config_cmd() {

test_expect_success "'ipfs config Swarm.AddrFilters' looks good with applied local-discovery profile" '
ipfs config Swarm.AddrFilters > actual_config &&
test $(cat actual_config | wc -l) = 1
test $(cat actual_config | wc -l) = 2
'

test_profile_apply_revert server local-discovery
Expand Down Expand Up @@ -301,7 +301,13 @@ test_config_cmd
test_kill_ipfs_daemon

# Be sure that on strict mode we can set config values that exist on Config struct
export IPFS_CONFIG_TOLERANT_MODE=
test_config_cmd_set "--json" "Discovery.MDNS.Enabled" "false"
export IPFS_CONFIG_TOLERANT_MODE=''
test_expect_success "set an exsisting field on config" '
ipfs config --json Discovery.MDNS.Enabled false
'

test_expect_success "set wrong field on config" '
test_must_fail ipfs config --json Discovery.MDNS.Enabledd false
'

test_done

0 comments on commit 0bff00e

Please sign in to comment.