fix t0024 on osx
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
why committed
Sep 3, 2017 at 18:40 UTC
2c300026aed724ee5aab2218532d29d24bc650e0
3 files changed
+54
-85
test/sharness/t0024-datastore-config.sh
+2
-85
@@ -9,92 +9,9 @@ test_init_ipfs
9
test_launch_ipfs_daemon
10
test_kill_ipfs_daemon
11
12
-SPEC_ORIG=$(cat <<'EOF')
13
-{
14
- "mounts": [
15
- {
16
- "child": {
17
- "path": "blocks",
18
- "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
19
- "sync": true,
20
- "type": "flatfs"
21
- },
22
- "mountpoint": "/blocks",
23
- "prefix": "flatfs.datastore",
24
- "type": "measure"
25
- },
26
- {
27
- "child": {
28
- "compression": "none",
29
- "path": "datastore",
30
- "type": "levelds"
31
- },
32
- "mountpoint": "/",
33
- "prefix": "leveldb.datastore",
34
- "type": "measure"
35
- }
36
- ],
37
- "type": "mount"
38
-}
39
-EOF
12
+SPEC_NOSYNC=$(cat ../t0024-files/spec-nosync)
13
41
-SPEC_NOSYNC=$(cat <<'EOF')
42
-{
43
- "mounts": [
44
- {
45
- "child": {
46
- "path": "blocks",
47
- "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
48
- "sync": false,
49
- "type": "flatfs"
50
- },
51
- "mountpoint": "/blocks",
52
- "prefix": "flatfs.datastore",
53
- "type": "measure"
54
- },
55
- {
56
- "child": {
57
- "compression": "none",
58
- "path": "datastore",
59
- "type": "levelds"
60
- },
61
- "mountpoint": "/",
62
- "prefix": "leveldb.datastore",
63
- "type": "measure"
64
- }
65
- ],
66
- "type": "mount"
67
-}
68
-EOF
69
-
70
-SPEC_NEWSHARDFUN=$(cat <<'EOF')
71
-{
72
- "mounts": [
73
- {
74
- "child": {
75
- "path": "blocks",
76
- "shardFunc": "/repo/flatfs/shard/v1/next-to-last/3",
77
- "sync": true,
78
- "type": "flatfs"
79
- },
80
- "mountpoint": "/blocks",
81
- "prefix": "flatfs.datastore",
82
- "type": "measure"
83
- },
84
- {
85
- "child": {
86
- "compression": "none",
87
- "path": "datastore",
88
- "type": "levelds"
89
- },
90
- "mountpoint": "/",
91
- "prefix": "leveldb.datastore",
92
- "type": "measure"
93
- }
94
- ],
95
- "type": "mount"
96
-}
97
-EOF
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"
test/sharness/t0024-files/spec-newshardfun
new
+26
@@ -0,0 +1,26 @@
1
+{
2
+ "mounts": [
3
+ {
4
+ "child": {
5
+ "path": "blocks",
6
+ "shardFunc": "/repo/flatfs/shard/v1/next-to-last/3",
7
+ "sync": true,
8
+ "type": "flatfs"
9
+ },
10
+ "mountpoint": "/blocks",
11
+ "prefix": "flatfs.datastore",
12
+ "type": "measure"
13
+ },
14
+ {
15
+ "child": {
16
+ "compression": "none",
17
+ "path": "datastore",
18
+ "type": "levelds"
19
+ },
20
+ "mountpoint": "/",
21
+ "prefix": "leveldb.datastore",
22
+ "type": "measure"
23
+ }
24
+ ],
25
+ "type": "mount"
26
+}
test/sharness/t0024-files/spec-nosync
new
+26
@@ -0,0 +1,26 @@
1
+{
2
+ "mounts": [
3
+ {
4
+ "child": {
5
+ "path": "blocks",
6
+ "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
7
+ "sync": false,
8
+ "type": "flatfs"
9
+ },
10
+ "mountpoint": "/blocks",
11
+ "prefix": "flatfs.datastore",
12
+ "type": "measure"
13
+ },
14
+ {
15
+ "child": {
16
+ "compression": "none",
17
+ "path": "datastore",
18
+ "type": "levelds"
19
+ },
20
+ "mountpoint": "/",
21
+ "prefix": "leveldb.datastore",
22
+ "type": "measure"
23
+ }
24
+ ],
25
+ "type": "mount"
26
+}