test: JSON response on empty remote service ls
Marcin Rataj committed
Jan 14, 2021 at 21:07 UTC
216b858f8a7492f38e7141b26285d06ecbc65108
1 file changed
+8
test/sharness/t0700-remotepin.sh
+8
@@ -20,6 +20,14 @@ TEST_PIN_SVC_KEY=$(curl -s -X POST "$TEST_PIN_SVC/users" -d email="go-ipfs-sharn
20
21
# pin remote service add|ls|rm
22
23
+# confirm empty service list response has proper json struct
24
+# https://github.com/ipfs/go-ipfs/pull/7829
25
+test_expect_success "test 'ipfs pin remote service ls' JSON on empty list" '
26
+ ipfs pin remote service ls --stat --enc=json | tee empty_ls_out &&
27
+ echo "{\"RemoteServices\":[]}" > exp_ls_out &&
28
+ test_cmp exp_ls_out empty_ls_out
29
+'
30
+
31
# add valid and invalid services
32
test_expect_success "creating test user on remote pinning service" '
33
echo CI host IP address ${TEST_PIN_SVC} &&