From 216b858f8a7492f38e7141b26285d06ecbc65108 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 14 Jan 2021 21:07:23 +0100 Subject: [PATCH] test: JSON response on empty remote service ls --- test/sharness/t0700-remotepin.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/sharness/t0700-remotepin.sh b/test/sharness/t0700-remotepin.sh index a033f8745..b03d4177d 100755 --- a/test/sharness/t0700-remotepin.sh +++ b/test/sharness/t0700-remotepin.sh @@ -20,6 +20,14 @@ TEST_PIN_SVC_KEY=$(curl -s -X POST "$TEST_PIN_SVC/users" -d email="go-ipfs-sharn # pin remote service add|ls|rm +# confirm empty service list response has proper json struct +# https://github.com/ipfs/go-ipfs/pull/7829 +test_expect_success "test 'ipfs pin remote service ls' JSON on empty list" ' + ipfs pin remote service ls --stat --enc=json | tee empty_ls_out && + echo "{\"RemoteServices\":[]}" > exp_ls_out && + test_cmp exp_ls_out empty_ls_out +' + # add valid and invalid services test_expect_success "creating test user on remote pinning service" ' echo CI host IP address ${TEST_PIN_SVC} &&