Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
c2e9a080
Commit
c2e9a080
authored
Apr 04, 2015
by
Christian Couder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t0080: use test_sort_cmp()
License: MIT Signed-off-by:
Christian Couder
<
chriscool@tuxfamily.org
>
parent
1f150710
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
test/sharness/t0080-repo.sh
test/sharness/t0080-repo.sh
+6
-18
No files found.
test/sharness/t0080-repo.sh
View file @
c2e9a080
...
...
@@ -49,10 +49,8 @@ test_expect_success "file no longer pinned" '
echo "$HASH_WELCOME_DOCS" >expected2 &&
ipfs refs -r "$HASH_WELCOME_DOCS" >>expected2 &&
echo QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn >> expected2 &&
sort expected2 >expected_sorted2 &&
ipfs pin ls -type=recursive >actual2 &&
sort actual2 >actual_sorted2 &&
test_cmp expected_sorted2 actual_sorted2
test_sort_cmp expected2 actual2
'
test_expect_success
"recursively pin afile"
'
...
...
@@ -95,10 +93,8 @@ test_expect_failure "'ipfs refs local' no longer shows file" '
echo QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn >expected8 &&
echo "$HASH_WELCOME_DOCS" >>expected8 &&
ipfs refs -r "$HASH_WELCOME_DOCS" >>expected8 &&
sort expected8 >expected_sorted8 &&
ipfs refs local >actual8 &&
sort actual8 >actual_sorted8 &&
test_cmp expected_sorted8 actual_sorted8
test_sort_cmp expected8 actual8
'
test_expect_success
"adding multiblock random file succeeds"
'
...
...
@@ -109,10 +105,8 @@ test_expect_success "adding multiblock random file succeeds" '
test_expect_success
"'ipfs pin ls -type=indirect' is correct"
'
ipfs refs "$MBLOCKHASH" >refsout &&
ipfs refs -r "$HASH_WELCOME_DOCS" >>refsout &&
sort refsout >refsout_sorted &&
ipfs pin ls -type=indirect >indirectpins &&
sort indirectpins >indirectpins_sorted &&
test_cmp refsout_sorted indirectpins_sorted
test_sort_cmp refsout indirectpins
'
test_expect_success
"pin something directly"
'
...
...
@@ -129,10 +123,8 @@ test_expect_success "pin something directly" '
test_expect_success
"'ipfs pin ls -type=direct' is correct"
'
echo "$DIRECTPIN" >directpinexpected &&
sort directpinexpected >dp_exp_sorted &&
ipfs pin ls -type=direct >directpinout &&
sort directpinout >dp_out_sorted &&
test_cmp dp_exp_sorted dp_out_sorted
test_sort_cmp directpinexpected directpinout
'
test_expect_success
"'ipfs pin ls -type=recursive' is correct"
'
...
...
@@ -140,20 +132,16 @@ test_expect_success "'ipfs pin ls -type=recursive' is correct" '
echo "$HASH_WELCOME_DOCS" >>rp_expected &&
echo QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn >>rp_expected &&
ipfs refs -r "$HASH_WELCOME_DOCS" >>rp_expected &&
sort rp_expected >rp_exp_sorted &&
ipfs pin ls -type=recursive >rp_actual &&
sort rp_actual >rp_act_sorted &&
test_cmp rp_exp_sorted rp_act_sorted
test_sort_cmp rp_expected rp_actual
'
test_expect_success
"'ipfs pin ls -type=all' is correct"
'
cat directpinout >allpins &&
cat rp_actual >>allpins &&
cat indirectpins >>allpins &&
sort allpins >allpins_sorted &&
ipfs pin ls -type=all >actual_allpins &&
sort actual_allpins >actual_allpins_sorted &&
test_cmp allpins_sorted actual_allpins_sorted
test_sort_cmp allpins actual_allpins
'
test_kill_ipfs_daemon
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment