Skip to content

Commit

Permalink
Conditionally skip test that fails because of openssl
Browse files Browse the repository at this point in the history
Ubuntu 22.04 comes with OpenSSL 3, and the specific version that PHP is
built against has a bug which has since been fixed but isn't showing up
in the images that GitHub has available.

See openssl/openssl#18574
and php/php-src#8369
  • Loading branch information
markstory committed Jul 25, 2022
1 parent 5731856 commit b98a0dc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/TestCase/Http/Client/Auth/OauthTest.php
Expand Up @@ -375,10 +375,17 @@ public function testRsaSigningString(): void
'privateKey' => $privateKey,
];
$auth = new Oauth();
$request = $auth->authentication($request, $options);

$result = $request->getHeaderLine('Authorization');
$this->assertSignatureFormat($result);
try {
$request = $auth->authentication($request, $options);
$result = $request->getHeaderLine('Authorization');
$this->assertSignatureFormat($result);
} catch (RuntimeException $e) {
// Handle 22.04 + OpenSSL bug. This should be safe to remove in the future.
if (strpos($e->getMessage(), 'unexpected eof while reading') !== false) {
$this->markTestSkipped('Skipping because of OpenSSL bug.');
}
throw $e;
}
}

public function testRsaSigningInvalidKey(): void
Expand Down

0 comments on commit b98a0dc

Please sign in to comment.