Skip to content

Commit ea4ce27

Browse files
whywhy
why
authored and
why
committed
fix t0024 on osx
1 parent 0b0ddef commit ea4ce27

File tree

3 files changed

+54
-85
lines changed

3 files changed

+54
-85
lines changed

test/sharness/t0024-datastore-config.sh

Lines changed: 2 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -9,92 +9,9 @@ test_init_ipfs
99
test_launch_ipfs_daemon
1010
test_kill_ipfs_daemon
1111

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)
4013

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)
9815

9916
test_expect_success "change runtime value in spec config" '
10017
ipfs config --json Datastore.Spec "$SPEC_NOSYNC"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
}

0 commit comments

Comments
 (0)