From e5ff2c3de2677e670ba301b0c5c209e8720bb62e Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Fri, 20 Apr 2018 17:03:11 +0200 Subject: [PATCH] cidsec: add test for command closing right away License: MIT Signed-off-by: Jakub Sztandera --- ...2VV34S33BE4MNCQITBRFYUPYQLDXYARR3DQW37MOT7K5XI.data | 3 +++ test/sharness/t0275-cid-security.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test/sharness/t0275-cid-security-data/CIQG6PGTD2VV34S33BE4MNCQITBRFYUPYQLDXYARR3DQW37MOT7K5XI.data diff --git a/test/sharness/t0275-cid-security-data/CIQG6PGTD2VV34S33BE4MNCQITBRFYUPYQLDXYARR3DQW37MOT7K5XI.data b/test/sharness/t0275-cid-security-data/CIQG6PGTD2VV34S33BE4MNCQITBRFYUPYQLDXYARR3DQW37MOT7K5XI.data new file mode 100644 index 000000000..e834edb38 --- /dev/null +++ b/test/sharness/t0275-cid-security-data/CIQG6PGTD2VV34S33BE4MNCQITBRFYUPYQLDXYARR3DQW37MOT7K5XI.data @@ -0,0 +1,3 @@ + +Ô +Um \ No newline at end of file diff --git a/test/sharness/t0275-cid-security.sh b/test/sharness/t0275-cid-security.sh index 318e3e439..3da56261b 100755 --- a/test/sharness/t0275-cid-security.sh +++ b/test/sharness/t0275-cid-security.sh @@ -71,6 +71,16 @@ test_gc test_launch_ipfs_daemon test_cat_get test_gc + +test_expect_success "add block linking to insecure" ' + mkdir -p "$IPFS_PATH/blocks/5X" && + cp -f "../t0275-cid-security-data/CIQG6PGTD2VV34S33BE4MNCQITBRFYUPYQLDXYARR3DQW37MOT7K5XI.data" "$IPFS_PATH/blocks/5X" +' + +test_expect_success "ipfs cat fails with code 1 and not timeout" ' + test_expect_code 1 go-timeout 1s ipfs cat QmVpsktzNeJdfWEpyeix93QJdQaBSgRNxebSbYSo9SQPGx +' + test_kill_ipfs_daemon test_done