Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to create parent directories in files cp command #8340

Merged
merged 6 commits into from
Aug 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for ipfs files cp -p
  • Loading branch information
Jesse Bouwman committed Aug 14, 2021
commit 0d87b474c1017166d9f5b36435166f629cb1980b
4 changes: 4 additions & 0 deletions test/sharness/t0250-files-api.sh
Original file line number Diff line number Diff line change
@@ -296,6 +296,10 @@ test_files_api() {
ipfs files cp /ipfs/$FILE3 /cats/this/is/a/dir/file3
'

test_expect_success "can copy file into deep dir using -p flag $EXTRA" '
Copy link
Member

Choose a reason for hiding this comment

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

Can we make sure the file was actually created? I.e., try reading it.

(trying to avoid regressions)

ipfs files cp -p /ipfs/$FILE3 /cats/some/other/dir/file3
'

test_expect_success "can read file $EXTRA" '
ipfs files read /cats/this/is/a/dir/file3 > output
'