Skip to content

Commit

Permalink
fix t0024 on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
why authored and why committed Sep 4, 2017
1 parent 0b0ddef commit ea4ce27
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 85 deletions.
87 changes: 2 additions & 85 deletions test/sharness/t0024-datastore-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,92 +9,9 @@ test_init_ipfs
test_launch_ipfs_daemon
test_kill_ipfs_daemon

SPEC_ORIG=$(cat <<'EOF')
{
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": true,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
}
EOF
SPEC_NOSYNC=$(cat ../t0024-files/spec-nosync)

SPEC_NOSYNC=$(cat <<'EOF')
{
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": false,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
}
EOF
SPEC_NEWSHARDFUN=$(cat <<'EOF')
{
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/3",
"sync": true,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
}
EOF
SPEC_NEWSHARDFUN=$(cat ../t0024-files/spec-newshardfun)

test_expect_success "change runtime value in spec config" '
ipfs config --json Datastore.Spec "$SPEC_NOSYNC"
Expand Down
26 changes: 26 additions & 0 deletions test/sharness/t0024-files/spec-newshardfun
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/3",
"sync": true,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
}
26 changes: 26 additions & 0 deletions test/sharness/t0024-files/spec-nosync
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": false,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
}

1 comment on commit ea4ce27

@GitCop
Copy link

@GitCop GitCop commented on ea4ce27 Sep 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.