From a10ef3c5c6d17a67e20bb5fe2ede3079136405ca Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Wed, 7 Feb 2024 07:49:51 +0100 Subject: [PATCH] test(pull): cope with old curl versions --- pull/tests/integration/integration_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pull/tests/integration/integration_test.cc b/pull/tests/integration/integration_test.cc index beaff4d9..1493e043 100644 --- a/pull/tests/integration/integration_test.cc +++ b/pull/tests/integration/integration_test.cc @@ -262,6 +262,7 @@ TEST_F(BasicAuthIntegrationTest, shouldRejectRequestWithWrongPassword) { ASSERT_EQ(metrics.code, 401); } +#if defined(CURLAUTH_BEARER) && defined(CURLOPT_XOAUTH2_BEARER) TEST_F(BasicAuthIntegrationTest, shouldRejectWrongAuthorizationMethod) { fetchPrePerform_ = [](CURL* curl) { curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BEARER); @@ -271,6 +272,7 @@ TEST_F(BasicAuthIntegrationTest, shouldRejectWrongAuthorizationMethod) { const auto metrics = FetchMetrics(default_metrics_path_); ASSERT_EQ(metrics.code, 401); } +#endif TEST_F(BasicAuthIntegrationTest, shouldRejectMalformedBase64) { std::unique_ptr header(