Skip to content

Commit 0bff00e

Browse files
committed
Fix more sharness tests
Signed-off-by: Antonio Navarro Perez <[email protected]>
1 parent 39d10ea commit 0bff00e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/sharness/t0021-config.sh

+11-5
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ test_config_cmd() {
201201

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

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

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

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

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

233233
test_profile_apply_revert server local-discovery
@@ -301,7 +301,13 @@ test_config_cmd
301301
test_kill_ipfs_daemon
302302

303303
# Be sure that on strict mode we can set config values that exist on Config struct
304-
export IPFS_CONFIG_TOLERANT_MODE=
305-
test_config_cmd_set "--json" "Discovery.MDNS.Enabled" "false"
304+
export IPFS_CONFIG_TOLERANT_MODE=''
305+
test_expect_success "set an exsisting field on config" '
306+
ipfs config --json Discovery.MDNS.Enabled false
307+
'
308+
309+
test_expect_success "set wrong field on config" '
310+
test_must_fail ipfs config --json Discovery.MDNS.Enabledd false
311+
'
306312

307313
test_done

0 commit comments

Comments
 (0)