Skip to content

Commit

Permalink
test(pull): cope with old curl versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Feb 7, 2024
1 parent 651da4a commit a10ef3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pull/tests/integration/integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<curl_slist, decltype(&curl_slist_free_all)> header(
Expand Down

0 comments on commit a10ef3c

Please sign in to comment.