Commit 6bd524fa authored by Steven Allen's avatar Steven Allen

correctly test refs local

We expect it to return a command error, not a 404, because `local` will be
interpreted as a path.

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent cccd03e8
......@@ -153,7 +153,6 @@ for cmd in add \
object/patch \
pin \
ping \
refs/local \
repo \
stats \
swarm \
......@@ -166,6 +165,13 @@ do
'
done
# This one is different. `local` will be interpreted as a path if the command isn't defined.
test_expect_success "test gateway api is sanitized: refs/local" '
echo "Error: invalid '"'ipfs ref'"' path" > refs_local_expected &&
! ipfs --api /ip4/127.0.0.1/tcp/$port refs local > refs_local_actual 2>&1 &&
test_cmp refs_local_expected refs_local_actual
'
test_expect_success "create raw-leaves node" '
echo "This is RAW!" > rfile &&
echo "This is RAW!" | ipfs add --raw-leaves -q > rhash
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment