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.
This commit is contained in:
Natanael Copa 2022-06-14 17:33:30 +02:00
parent d7d4eb7d60
commit 684cd989e6

View File

@ -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
}