| 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2015 Brian Holder-Chow Lin On |
| 4 | # MIT Licensed; see the LICENSE file in this repository. |
| 5 | # |
| 6 | |
| 7 | test_description="Test user-provided config values" |
| 8 | |
| 9 | . lib/test-lib.sh |
| 10 | |
| 11 | test_init_ipfs |
| 12 | |
| 13 | test_expect_success "bootstrap doesn't overwrite user-provided config keys (top-level)" ' |
| 14 | ipfs config Identity.PeerID >previous && |
| 15 | ipfs config Identity.PeerID foo && |
| 16 | ipfs bootstrap rm --all && |
| 17 | echo "foo" >expected && |
| 18 | ipfs config Identity.PeerID >actual && |
| 19 | ipfs config Identity.PeerID $(cat previous) && |
| 20 | test_cmp expected actual |
| 21 | ' |
| 22 | |
| 23 | test_done |