From 29004b2b3b00296a7073287ae2d43ef0391fc187 Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Wed, 27 Jan 2021 14:07:04 -0500 Subject: [PATCH] test: add sharness tests for remote pinning service endpoints that are not http(s) URIs --- test/sharness/t0700-remotepin.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/sharness/t0700-remotepin.sh b/test/sharness/t0700-remotepin.sh index a033f87457f5..65ca4aac2c27 100755 --- a/test/sharness/t0700-remotepin.sh +++ b/test/sharness/t0700-remotepin.sh @@ -29,6 +29,12 @@ test_expect_success "creating test user on remote pinning service" ' ipfs pin remote service add test_invalid_url_dns_svc https://invalid-service.example.com fake_api_key ' +# add a service with a invalid endpoint +test_expect_success "adding remote service with invalid endpoint" ' + test_expect_code 1 ipfs pin remote service add test_endpoint_no_protocol invalid-service.example.com fake_api_key && + test_expect_code 1 ipfs pin remote service add test_endpoint_bad_protocol xyz://invalid-service.example.com fake_api_key +' + test_expect_success "test 'ipfs pin remote service ls'" ' ipfs pin remote service ls | tee ls_out && grep -q test_pin_svc ls_out &&