From e0d484431adc292e1aa63aeb36cd2298486c743f 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 b03d4177d..cac374193 100755 --- a/test/sharness/t0700-remotepin.sh +++ b/test/sharness/t0700-remotepin.sh @@ -37,6 +37,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 && -- GitLab