master
sh 31 lines 644 Bytes
Raw
1 #!/usr/bin/env bash
2
3 test_description="Test datastore config"
4
5 . lib/test-lib.sh
6
7 test_init_ipfs
8
9 test_launch_ipfs_daemon
10 test_kill_ipfs_daemon
11
12 SPEC_NOSYNC=$(cat ../t0024-files/spec-nosync)
13
14 SPEC_NEWSHARDFUN=$(cat ../t0024-files/spec-newshardfun)
15
16 test_expect_success "change runtime value in spec config" '
17 ipfs config --json Datastore.Spec "$SPEC_NOSYNC"
18 '
19
20 test_launch_ipfs_daemon
21 test_kill_ipfs_daemon
22
23 test_expect_success "change on-disk value in spec config" '
24 ipfs config --json Datastore.Spec "$SPEC_NEWSHARDFUN"
25 '
26
27 test_expect_success "can not launch daemon after on-disk value change" '
28 test_must_fail ipfs daemon
29 '
30
31 test_done