From 684cd989e6f07d68b6bb923e0181708e1e342609 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 14 Jun 2022 17:33:30 +0200 Subject: [PATCH] tests: abuild-fetch: add test for http --insecure when abuild-fetch is used with http source, curl should add --insecure option. Verify this in a test. --- tests/abuild_fetch_test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/abuild_fetch_test b/tests/abuild_fetch_test index 90c3834..94696da 100755 --- a/tests/abuild_fetch_test +++ b/tests/abuild_fetch_test @@ -4,7 +4,8 @@ init_tests \ abuild_fetch_help \ abuild_fetch_curl_invocation \ - abuild_fetch_curl_failure + abuild_fetch_curl_failure \ + abuild_fetch_curl_insecure create_fake_curl() { mkdir bin @@ -50,3 +51,11 @@ abuild_fetch_curl_failure_body() { abuild-fetch https://example.com/non-existing } +abuild_fetch_curl_insecure_body() { + create_fake_curl + atf_check -s exit:0 \ + -o match:"--insecure" \ + -e empty \ + abuild-fetch http://example.com/non-existing +} +