Skip to content

Commit

Permalink
don't run client credentials tests for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Sep 1, 2016
1 parent 6f6ae8a commit db2340e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/Functional/AuthenticationTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,13 @@ public function testObtainAccessTokenWithoutAuthenticating()
*/
public function testAuthenticateViaOAuth2ClientCredentials()
{
// $this->markTestSkipped('Client credentials not configured properly.');
if(getenv('FS_KEY_PASSWORD') === false){
$this->markTestSkipped('Client credentials not configured properly.');
}

$factory = new StateFactory();
$state = $factory->newCollectionState();

// Load the key
if(getenv('FS_KEY_PASSWORD') === false){
throw new \Exception('Password for client key not set in FS_KEY_PASSWORD environment variable; unable to use key for authentication');
}
$key = openssl_pkey_get_private('file://key.pem', getenv('FS_KEY_PASSWORD'));

$state->authenticateViaOAuth2ClientCredentials('a0T3000000BkhenEAB', $state->generateClientSecret($key, 1447773012436));
Expand Down

0 comments on commit db2340e

Please sign in to comment.