From a1abf73947ff1309070a07697108116b8bf0facd Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Tue, 15 Sep 2015 13:09:43 -0700 Subject: [PATCH] test refactoring * test files/classes match class names * removes tests/general/AuthTest.php because it tested firebase-jwt library, and not this library. * removes tests/testdata/*.pem, tests/testdata/*.p12, and tests/testdata/*.json as they are no longer used. --- .gitignore | 1 + phpunit.xml.dist | 28 +-- tests/BaseTest.php | 5 +- .../Auth/ComputeEngineTest.php} | 2 +- .../Auth/OAuth2Test.php} | 2 +- tests/{general => Google}/CacheTest.php | 2 +- .../ClientTest.php} | 17 +- .../Http/BatchTest.php} | 2 +- .../Http/MediaFuleUploadTest.php} | 2 +- .../RestTest.php => Google/Http/RESTTest.php} | 2 +- tests/{general => Google}/LoggerTest.php | 2 +- .../ApiModelTest.php => Google/ModelTest.php} | 2 +- .../Service}/AdSenseTest.php | 2 +- .../Service/PagespeedonlineTest.php} | 2 +- tests/{plus => Google/Service}/PlusTest.php | 2 +- .../Service}/ResourceTest.php | 2 +- tests/{tasks => Google/Service}/TasksTest.php | 2 +- .../Service/UrlshortenerTest.php} | 22 +- .../Service}/YouTubeTest.php | 2 +- tests/{general => Google}/ServiceTest.php | 2 +- .../Task/RunnerTest.php} | 2 +- .../Utils/URITemplateTest} | 2 +- tests/{general/testdata => config}/test.ini | 0 tests/general/AuthTest.php | 221 ------------------ tests/general/testdata/cacert.json | 1 - tests/general/testdata/cacert.pem | 17 -- tests/general/testdata/cert.p12 | Bin 2196 -> 0 bytes tests/general/testdata/privkey.pem | 9 - tests/general/testdata/service-12345.json | 7 - tests/general/testdata/service-rsa-12345.json | 7 - tests/general/testdata/test_public_key.pem | 20 -- 31 files changed, 51 insertions(+), 338 deletions(-) rename tests/{general/ComputeEngineAuthTest.php => Google/Auth/ComputeEngineTest.php} (98%) rename tests/{general/ApiOAuth2Test.php => Google/Auth/OAuth2Test.php} (99%) rename tests/{general => Google}/CacheTest.php (98%) rename tests/{general/ApiClientTest.php => Google/ClientTest.php} (93%) rename tests/{general/ApiBatchRequestTest.php => Google/Http/BatchTest.php} (98%) rename tests/{general/ApiMediaFileUploadTest.php => Google/Http/MediaFuleUploadTest.php} (98%) rename tests/{general/RestTest.php => Google/Http/RESTTest.php} (98%) rename tests/{general => Google}/LoggerTest.php (99%) rename tests/{general/ApiModelTest.php => Google/ModelTest.php} (99%) rename tests/{adsense => Google/Service}/AdSenseTest.php (99%) rename tests/{pagespeed/PageSpeedTest.php => Google/Service/PagespeedonlineTest.php} (95%) rename tests/{plus => Google/Service}/PlusTest.php (97%) rename tests/{general => Google/Service}/ResourceTest.php (98%) rename tests/{tasks => Google/Service}/TasksTest.php (98%) rename tests/{urlshortener/UrlShortenerTests.php => Google/Service/UrlshortenerTest.php} (73%) rename tests/{youtube => Google/Service}/YouTubeTest.php (98%) rename tests/{general => Google}/ServiceTest.php (98%) rename tests/{general/TaskTest.php => Google/Task/RunnerTest.php} (99%) rename tests/{general/URITemplateTest.php => Google/Utils/URITemplateTest} (99%) rename tests/{general/testdata => config}/test.ini (100%) delete mode 100644 tests/general/AuthTest.php delete mode 100644 tests/general/testdata/cacert.json delete mode 100644 tests/general/testdata/cacert.pem delete mode 100644 tests/general/testdata/cert.p12 delete mode 100644 tests/general/testdata/privkey.pem delete mode 100644 tests/general/testdata/service-12345.json delete mode 100644 tests/general/testdata/service-rsa-12345.json delete mode 100644 tests/general/testdata/test_public_key.pem diff --git a/.gitignore b/.gitignore index 61e67f061..8c11bd412 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ vendor examples/testfile-small.txt examples/testfile.txt tests/.accessToken +tests/.apiKey diff --git a/phpunit.xml.dist b/phpunit.xml.dist index bb8e834bf..3c57499f5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,31 +4,13 @@ colors="true" bootstrap="tests/bootstrap.php"> - - tests/youtube - - - tests/tasks - - - tests/pagespeed - - - tests/urlshortener - - - tests/plus - - - tests/adsense - - - tests/general + + tests/Google - - tests - + + ./src/Google + diff --git a/tests/BaseTest.php b/tests/BaseTest.php index 27710cc5d..72d47868b 100644 --- a/tests/BaseTest.php +++ b/tests/BaseTest.php @@ -21,6 +21,7 @@ class BaseTest extends PHPUnit_Framework_TestCase private $token; private $memcacheHost; private $memcachePort; + protected $testDir = __DIR__; public function __construct() { @@ -79,12 +80,12 @@ public function loadToken() public function checkKey() { + $this->key = $this->loadKey(); + if (!strlen($this->key)) { $this->markTestSkipped("Test requires api key\nYou can create one in your developer console"); return false; } - - $this->key = $this->loadKey(); } public function loadKey() diff --git a/tests/general/ComputeEngineAuthTest.php b/tests/Google/Auth/ComputeEngineTest.php similarity index 98% rename from tests/general/ComputeEngineAuthTest.php rename to tests/Google/Auth/ComputeEngineTest.php index dbd0ad504..e866a2303 100644 --- a/tests/general/ComputeEngineAuthTest.php +++ b/tests/Google/Auth/ComputeEngineTest.php @@ -20,7 +20,7 @@ use GuzzleHttp\Message\Request; -class ComputeEngineAuthTest extends BaseTest +class Google_Auth_ComputeEngineTest extends BaseTest { public function testTokenAcquisition() { diff --git a/tests/general/ApiOAuth2Test.php b/tests/Google/Auth/OAuth2Test.php similarity index 99% rename from tests/general/ApiOAuth2Test.php rename to tests/Google/Auth/OAuth2Test.php index 3bdb2c32a..b5a4be53c 100644 --- a/tests/general/ApiOAuth2Test.php +++ b/tests/Google/Auth/OAuth2Test.php @@ -21,7 +21,7 @@ * under the License. */ -class ApiOAuth2Test extends BaseTest +class Google_Auth_OAuth2Test extends BaseTest { public function testSign() diff --git a/tests/general/CacheTest.php b/tests/Google/CacheTest.php similarity index 98% rename from tests/general/CacheTest.php rename to tests/Google/CacheTest.php index 8a61a9a3e..0fc32e166 100644 --- a/tests/general/CacheTest.php +++ b/tests/Google/CacheTest.php @@ -18,7 +18,7 @@ * under the License. */ -class CacheTest extends BaseTest +class Google_CacheTest extends BaseTest { public function testFile() { diff --git a/tests/general/ApiClientTest.php b/tests/Google/ClientTest.php similarity index 93% rename from tests/general/ApiClientTest.php rename to tests/Google/ClientTest.php index 3700f3a72..252914f1e 100644 --- a/tests/general/ApiClientTest.php +++ b/tests/Google/ClientTest.php @@ -20,7 +20,7 @@ use GuzzleHttp\Message\Request; -class ApiClientTest extends BaseTest +class Google_ClientTest extends BaseTest { public function testClient() { @@ -195,7 +195,7 @@ public function testJsonConfig() public function testIniConfig() { - $config = new Google_Config(__DIR__ . "/testdata/test.ini"); + $config = new Google_Config($this->testDir . "/config/test.ini"); $this->assertEquals('My Test application', $config->getApplicationName()); $this->assertEquals( 'gjfiwnGinpena3', @@ -210,4 +210,17 @@ public function testIniConfig() $config->getClassConfig('Google_IO_Abstract', 'request_timeout_seconds') ); } + + public function testNoAuth() + { + /** @var $noAuth Google_Auth_Simple */ + $noAuth = new Google_Auth_Simple($this->getClient()); + $client = new Google_Client(); + $client->setAuth($noAuth); + $client->setDeveloperKey(null); + $req = new Request('GET', 'http://example.com'); + + $resp = $noAuth->sign($req); + $this->assertEquals('http://example.com', $resp->getUrl()); + } } diff --git a/tests/general/ApiBatchRequestTest.php b/tests/Google/Http/BatchTest.php similarity index 98% rename from tests/general/ApiBatchRequestTest.php rename to tests/Google/Http/BatchTest.php index f948286f3..c8aaa538d 100644 --- a/tests/general/ApiBatchRequestTest.php +++ b/tests/Google/Http/BatchTest.php @@ -18,7 +18,7 @@ * under the License. */ -class ApiBatchRequestTest extends BaseTest +class Google_Http_BatchTest extends BaseTest { public $plus; diff --git a/tests/general/ApiMediaFileUploadTest.php b/tests/Google/Http/MediaFuleUploadTest.php similarity index 98% rename from tests/general/ApiMediaFileUploadTest.php rename to tests/Google/Http/MediaFuleUploadTest.php index f8fd27614..b4853b805 100644 --- a/tests/general/ApiMediaFileUploadTest.php +++ b/tests/Google/Http/MediaFuleUploadTest.php @@ -22,7 +22,7 @@ * under the License. */ -class ApiMediaFileUploadTest extends BaseTest +class Google_Http_MediaFileUploadTest extends BaseTest { public function testMediaFile() { diff --git a/tests/general/RestTest.php b/tests/Google/Http/RESTTest.php similarity index 98% rename from tests/general/RestTest.php rename to tests/Google/Http/RESTTest.php index bf80899a0..0197d3af8 100644 --- a/tests/general/RestTest.php +++ b/tests/Google/Http/RESTTest.php @@ -18,7 +18,7 @@ use GuzzleHttp\Message\Response; use GuzzleHttp\Stream\Stream; -class RestTest extends BaseTest +class Google_HTTP_RESTTest extends BaseTest { /** * @var Google_Http_REST $rest diff --git a/tests/general/LoggerTest.php b/tests/Google/LoggerTest.php similarity index 99% rename from tests/general/LoggerTest.php rename to tests/Google/LoggerTest.php index cfdf8d4f8..255616a60 100644 --- a/tests/general/LoggerTest.php +++ b/tests/Google/LoggerTest.php @@ -18,7 +18,7 @@ * under the License. */ -class LoggerTest extends PHPUnit_Framework_TestCase +class Google_LoggerTest extends PHPUnit_Framework_TestCase { private $client; diff --git a/tests/general/ApiModelTest.php b/tests/Google/ModelTest.php similarity index 99% rename from tests/general/ApiModelTest.php rename to tests/Google/ModelTest.php index 9a81e714e..39bb87b86 100644 --- a/tests/general/ApiModelTest.php +++ b/tests/Google/ModelTest.php @@ -18,7 +18,7 @@ * under the License. */ -class ApiModelTest extends BaseTest +class Google_ModelTest extends BaseTest { private $calendarData = '{ "kind": "calendar#event", diff --git a/tests/adsense/AdSenseTest.php b/tests/Google/Service/AdSenseTest.php similarity index 99% rename from tests/adsense/AdSenseTest.php rename to tests/Google/Service/AdSenseTest.php index 4033ed276..3d04937f6 100644 --- a/tests/adsense/AdSenseTest.php +++ b/tests/Google/Service/AdSenseTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -class AdSenseManagementTest extends BaseTest +class Google_Service_AdSenseTest extends BaseTest { public $adsense; public function __construct() diff --git a/tests/pagespeed/PageSpeedTest.php b/tests/Google/Service/PagespeedonlineTest.php similarity index 95% rename from tests/pagespeed/PageSpeedTest.php rename to tests/Google/Service/PagespeedonlineTest.php index c912d64e9..622600433 100644 --- a/tests/pagespeed/PageSpeedTest.php +++ b/tests/Google/Service/PagespeedonlineTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -class PageSpeedTest extends BaseTest +class Google_Service_PagespeedonlineTest extends BaseTest { public $service; public function __construct() diff --git a/tests/plus/PlusTest.php b/tests/Google/Service/PlusTest.php similarity index 97% rename from tests/plus/PlusTest.php rename to tests/Google/Service/PlusTest.php index 98f042e48..cb132afdc 100644 --- a/tests/plus/PlusTest.php +++ b/tests/Google/Service/PlusTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -class PlusTest extends BaseTest +class Google_Service_PlusTest extends BaseTest { /** @var Google_PlusService */ public $plus; diff --git a/tests/general/ResourceTest.php b/tests/Google/Service/ResourceTest.php similarity index 98% rename from tests/general/ResourceTest.php rename to tests/Google/Service/ResourceTest.php index 6851625ff..9312093ac 100644 --- a/tests/general/ResourceTest.php +++ b/tests/Google/Service/ResourceTest.php @@ -30,7 +30,7 @@ public function __construct(Google_Client $client) } } -class ResourceTest extends PHPUnit_Framework_TestCase +class Google_Service_ResourceTest extends PHPUnit_Framework_TestCase { private $client; private $service; diff --git a/tests/tasks/TasksTest.php b/tests/Google/Service/TasksTest.php similarity index 98% rename from tests/tasks/TasksTest.php rename to tests/Google/Service/TasksTest.php index a0ba58ef4..8f98586d1 100644 --- a/tests/tasks/TasksTest.php +++ b/tests/Google/Service/TasksTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -class TasksTest extends BaseTest +class Google_Service_TasksTest extends BaseTest { /** @var Google_TasksService */ public $taskService; diff --git a/tests/urlshortener/UrlShortenerTests.php b/tests/Google/Service/UrlshortenerTest.php similarity index 73% rename from tests/urlshortener/UrlShortenerTests.php rename to tests/Google/Service/UrlshortenerTest.php index 08422bc77..9eacd0e35 100644 --- a/tests/urlshortener/UrlShortenerTests.php +++ b/tests/Google/Service/UrlshortenerTest.php @@ -15,31 +15,29 @@ * limitations under the License. */ -class UrlShortenerTests extends BaseTest +class Google_Service_UrlshortenerTest extends BaseTest { - /** @var Google_UrlshortenerService */ - public $service; - - public function __construct() - { - parent::__construct(); - $this->service = new Google_Service_Urlshortener($this->getClient()); - } - public function testUrlShort() { + $this->checkKey(); + + $service = new Google_Service_Urlshortener($this->getClient()); $url = new Google_Service_Urlshortener_Url(); $url->longUrl = "http://google.com"; - $shortUrl = $this->service->url->insert($url); + $shortUrl = $service->url->insert($url); $this->assertEquals('urlshortener#url', $shortUrl['kind']); $this->assertEquals('http://google.com/', $shortUrl['longUrl']); } public function testEmptyJsonResponse() { + $this->checkKey(); + + $service = new Google_Service_Urlshortener($this->getClient()); + $optParams = array('fields' => ''); - $resp = $this->service->url->get('http://goo.gl/KkHq8', $optParams); + $resp = $service->url->get('http://goo.gl/KkHq8', $optParams); $this->assertEquals("", $resp->longUrl); } diff --git a/tests/youtube/YouTubeTest.php b/tests/Google/Service/YouTubeTest.php similarity index 98% rename from tests/youtube/YouTubeTest.php rename to tests/Google/Service/YouTubeTest.php index 252ef0476..657760aa3 100644 --- a/tests/youtube/YouTubeTest.php +++ b/tests/Google/Service/YouTubeTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -class YouTubeTest extends BaseTest +class Google_Service_YouTubeTest extends BaseTest { /** @var Google_PlusService */ public $plus; diff --git a/tests/general/ServiceTest.php b/tests/Google/ServiceTest.php similarity index 98% rename from tests/general/ServiceTest.php rename to tests/Google/ServiceTest.php index b3963b158..75801c25c 100644 --- a/tests/general/ServiceTest.php +++ b/tests/Google/ServiceTest.php @@ -31,7 +31,7 @@ public function isAssociativeArray($array) } } -class ServiceTest extends PHPUnit_Framework_TestCase +class Google_ServiceTest extends PHPUnit_Framework_TestCase { public function testModel() diff --git a/tests/general/TaskTest.php b/tests/Google/Task/RunnerTest.php similarity index 99% rename from tests/general/TaskTest.php rename to tests/Google/Task/RunnerTest.php index eb57ab4d2..359e916a9 100644 --- a/tests/general/TaskTest.php +++ b/tests/Google/Task/RunnerTest.php @@ -19,7 +19,7 @@ use GuzzleHttp\Message\Response; use GuzzleHttp\Stream\Stream; -class TaskTest extends PHPUnit_Framework_TestCase +class Google_Task_RunnerTest extends PHPUnit_Framework_TestCase { private $client; diff --git a/tests/general/URITemplateTest.php b/tests/Google/Utils/URITemplateTest similarity index 99% rename from tests/general/URITemplateTest.php rename to tests/Google/Utils/URITemplateTest index a525f1216..2e5535c25 100644 --- a/tests/general/URITemplateTest.php +++ b/tests/Google/Utils/URITemplateTest @@ -18,7 +18,7 @@ * under the License. */ -class URITemplateTest extends BaseTest +class Google_Utils_URITemplateTest extends BaseTest { public function testLevelOne() { diff --git a/tests/general/testdata/test.ini b/tests/config/test.ini similarity index 100% rename from tests/general/testdata/test.ini rename to tests/config/test.ini diff --git a/tests/general/AuthTest.php b/tests/general/AuthTest.php deleted file mode 100644 index d1e2d1398..000000000 --- a/tests/general/AuthTest.php +++ /dev/null @@ -1,221 +0,0 @@ -pem = file_get_contents(__DIR__.'/'.self::PUBLIC_KEY_FILE, true); - $this->privateKey = file_get_contents(__DIR__.'/'.self::PRIVATE_KEY_FILE, true); - } - - public function testDirectInject() - { - $privateKeyString = <<privateKey, $certs, 'notasecret'); - - return JWT::encode($payload, $certs['pkey'], 'RS256'); - } - - // Returns certificates similar to the ones used by google authentication. - private function getSignonCert() - { - return openssl_x509_read($this->pem); - } - - public function testVerifySignedJwtWithCerts() - { - $id_token = $this->makeSignedJwt( - array( - "iss" => "federated-signon@system.gserviceaccount.com", - "aud" => "client_id", - "sub" => self::USER_ID, - "iat" => time(), - "exp" => time() + 3600 - ) - ); - $cert = $this->getSignonCert(); - $oauth2 = new Google_Auth_OAuth2($this->getClient()); - $ticket = JWT::decode($id_token, $cert, array('RS256')); - $this->assertEquals(self::USER_ID, $ticket->sub); - // Check that payload and envelope got filled in. - $this->assertEquals("client_id", $ticket->aud); - } - - // Checks that the id token fails to verify with the expected message. - private function checkIdTokenFailure($id_token, $msg, $issuer = null) - { - $cert = $this->getSignonCert(); - try { - $ticket = JWT::decode($id_token, $cert, array('RS256')); - $this->fail("Should have thrown for $id_token"); - } catch (\DomainException $e) { - $this->assertContains($msg, $e->getMessage()); - } catch (\UnexpectedValueException $e) { - $this->assertContains($msg, $e->getMessage()); - } - } - - public function testVerifySignedJwtWithMultipleIssuers() - { - $id_token = $this->makeSignedJwt( - array( - "iss" => "system.gserviceaccount.com", - "aud" => "client_id", - "sub" => self::USER_ID, - "iat" => time(), - "exp" => time() + 3600 - ) - ); - $certs = $this->getSignonCerts(); - $oauth2 = new Google_Auth_OAuth2($this->getClient()); - $ticket = $oauth2->verifySignedJwtWithCerts( - $id_token, - $certs, - "client_id", - array('system.gserviceaccount.com', 'https://system.gserviceaccount.com') - ); - $this->assertEquals(self::USER_ID, $ticket->getUserId()); - // Check that payload and envelope got filled in. - $attributes = $ticket->getAttributes(); - $this->assertEquals("JWT", $attributes["envelope"]["typ"]); - $this->assertEquals("client_id", $attributes["payload"]["aud"]); - } - - public function testVerifySignedJwtWithBadIssuer() - { - $id_token = $this->makeSignedJwt( - array( - "iss" => "fake.gserviceaccount.com", - "aud" => "client_id", - "sub" => self::USER_ID, - "iat" => time(), - "exp" => time() + 3600 - ) - ); - - $issuers = array('system.gserviceaccount.com', 'https://system.gserviceaccount.com'); - $this->checkIdTokenFailure($id_token, 'Invalid issuer', $issuers[0]); - $this->checkIdTokenFailure($id_token, 'Invalid issuer', $issuers); - } - - public function testVerifySignedJwtWithBadJwt() - { - $this->checkIdTokenFailure("foo", "Wrong number of segments"); - $this->checkIdTokenFailure("foo.bar", "Wrong number of segments"); - $this->checkIdTokenFailure( - base64_encode("foo").".bar.baz", - "Syntax error, malformed JSON" - ); - } - - public function testVerifySignedJwtWithBadSignature() - { - $id_token = $this->makeSignedJwt( - array( - "iss" => "federated-signon@system.gserviceaccount.com", - "aud" => "client_id", - "id" => self::USER_ID, - "iat" => time(), - "exp" => time() + 3600 - ) - ); - $id_token = substr_replace($id_token, '000', -3); - $this->checkIdTokenFailure($id_token, "OpenSSL unable to verify data"); - } - - public function testVerifySignedJwtWithTooEarly() - { - $id_token = $this->makeSignedJwt( - array( - "iss" => "federated-signon@system.gserviceaccount.com", - "aud" => "client_id", - "id" => self::USER_ID, - "iat" => time() + 1800, - "exp" => time() + 3600 - ) - ); - $this->checkIdTokenFailure($id_token, "Cannot handle token prior"); - } - - public function testVerifySignedJwtWithTooLate() - { - $id_token = $this->makeSignedJwt( - array( - "iss" => "federated-signon@system.gserviceaccount.com", - "aud" => "client_id", - "id" => self::USER_ID, - "iat" => time() - 3600, - "exp" => time() - 1800 - ) - ); - $this->checkIdTokenFailure($id_token, "Expired token"); - } - - public function testNoAuth() - { - /** @var $noAuth Google_Auth_Simple */ - $noAuth = new Google_Auth_Simple($this->getClient()); - $oldAuth = $this->getClient()->getAuth(); - $this->getClient()->setAuth($noAuth); - $this->getClient()->setDeveloperKey(null); - $req = new Request('GET', 'http://example.com'); - - $resp = $noAuth->sign($req); - $this->assertEquals('http://example.com', $resp->getUrl()); - $this->getClient()->setAuth($oldAuth); - } -} diff --git a/tests/general/testdata/cacert.json b/tests/general/testdata/cacert.json deleted file mode 100644 index 3de7c4467..000000000 --- a/tests/general/testdata/cacert.json +++ /dev/null @@ -1 +0,0 @@ -{"a": "-----BEGIN CERTIFICATE-----\nMIICrDCCAlagAwIBAgIJAIhhwVyFHrVfMA0GCSqGSIb3DQEBBQUAMG8xCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQxCjAIBgNVBAsTAWExCjAIBgNVBAMTAWIxEDAOBgkqhkiG\n9w0BCQEWAWMwHhcNMTIwMjE5MDExMzQxWhcNMTUwMjE4MDExMzQxWjBvMQswCQYD\nVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQg\nV2lkZ2l0cyBQdHkgTHRkMQowCAYDVQQLEwFhMQowCAYDVQQDEwFiMRAwDgYJKoZI\nhvcNAQkBFgFjMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAM4Aozh3TMZYcPx7MHln\nD8MtyVUjzo6OdT32JwRHzHHNMMm88lNVfLYIT9C/jgXlDqG0h5wSClMvTQbdihNd\nFOkCAwEAAaOB1DCB0TAdBgNVHQ4EFgQUv0Ahb7HD9TLfdtLeaatjFj91NqYwgaEG\nA1UdIwSBmTCBloAUv0Ahb7HD9TLfdtLeaatjFj91Nqahc6RxMG8xCzAJBgNVBAYT\nAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRn\naXRzIFB0eSBMdGQxCjAIBgNVBAsTAWExCjAIBgNVBAMTAWIxEDAOBgkqhkiG9w0B\nCQEWAWOCCQCIYcFchR61XzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA0EA\nKAbxbWHsaVPnYc0YqG/Pn4HbcI1+xnVQSt3hdzq+yC0lP9H7hBMCVSykhhBkZ5XQ\nHA2t6LHuYsjcCO+LBX/4fA==\n-----END CERTIFICATE-----"} \ No newline at end of file diff --git a/tests/general/testdata/cacert.pem b/tests/general/testdata/cacert.pem deleted file mode 100644 index c95977b07..000000000 --- a/tests/general/testdata/cacert.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICrDCCAlagAwIBAgIJAIhhwVyFHrVfMA0GCSqGSIb3DQEBBQUAMG8xCzAJBgNV -BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQxCjAIBgNVBAsTAWExCjAIBgNVBAMTAWIxEDAOBgkqhkiG -9w0BCQEWAWMwHhcNMTIwMjE5MDExMzQxWhcNMTUwMjE4MDExMzQxWjBvMQswCQYD -VQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQg -V2lkZ2l0cyBQdHkgTHRkMQowCAYDVQQLEwFhMQowCAYDVQQDEwFiMRAwDgYJKoZI -hvcNAQkBFgFjMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAM4Aozh3TMZYcPx7MHln -D8MtyVUjzo6OdT32JwRHzHHNMMm88lNVfLYIT9C/jgXlDqG0h5wSClMvTQbdihNd -FOkCAwEAAaOB1DCB0TAdBgNVHQ4EFgQUv0Ahb7HD9TLfdtLeaatjFj91NqYwgaEG -A1UdIwSBmTCBloAUv0Ahb7HD9TLfdtLeaatjFj91Nqahc6RxMG8xCzAJBgNVBAYT -AkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRn -aXRzIFB0eSBMdGQxCjAIBgNVBAsTAWExCjAIBgNVBAMTAWIxEDAOBgkqhkiG9w0B -CQEWAWOCCQCIYcFchR61XzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA0EA -KAbxbWHsaVPnYc0YqG/Pn4HbcI1+xnVQSt3hdzq+yC0lP9H7hBMCVSykhhBkZ5XQ -HA2t6LHuYsjcCO+LBX/4fA== ------END CERTIFICATE----- \ No newline at end of file diff --git a/tests/general/testdata/cert.p12 b/tests/general/testdata/cert.p12 deleted file mode 100644 index acea8f62e08609fafd9f5652f75808099f05874c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2196 zcmY+Fc{~#iAICSgnV}q;TgWkYTZs|5mZMAVBX@3#C`uQ`q%=Qg2dN>kEmD5Y+~%Bf zbInoajKm1PsPyRddY-4}`Q!WgzFzOo>-+uZ^T!*7ho*7?xlwqiBZOBi(K7KL0U!^M zgoj#y@KCdTY=pu?EdE3g5*~utN7`IK!2Z(wlK@fD5ZJ#z@B<;J10X0aNXp8QOse7H zf&yak5I}$|&X7hGZ{+hHF%QOye^eCL3~pK4!@YNnoggJ%qwEYzZQKgR)I?57U}1BI_`t@SJ4?x!Ixm8DAWa z&hka?TJuXcqC+z;kNn#D=u?~0Ph2HZm*QSW@ZM0IVhTCmfUVuesuPD(poy4IZhfX~ zSaofN&vABFOciC|^4mw|m0*ltFD2W0e45-P*fBB2ENPPIuBxU#S$j4~4`w!!2WQgX zd2Yfyq2YKvqn;MW(Ey35%X$HwQ?O9Met7JRj*Lo$6u+0i`y(s2wcjD)d7^fWKNX4( z&|`&T*y+C*E#pb4n4RfJkxUoRgIlk3wc1^4Je`dB! zEKSpE49+FA;Gc9N_rR;+*TVFUF$oEFC3LG@XqUjI1l}Z|Rh2;pcHsFo*5$d+U^_n>WTel+o4UbfA1o zjAeOtvvJShD3A!vLs?7-4o;_+oUqQcb~l+Yfw?mv}VXjby}EZsyFKb9$rh zq8J=8p7`)>ZkDRG(1+J#S<)4)EI%PL%L@m1Bl?zJSglLlZLHlsK-b0&%t@!MSz(Ci zvAibMCZfts(dLv~XHS00Ng9+=+54eN2?c1zbRJVkYZT{yYQlM3U?V`1t!w2JdNEd; zqdmyQ?5t=;5@e$$un8sT<*+)Gz^@YV-ZS?Qjmmu4*JqhSs5eQAO5*6d&UG#nJW_7R z%~&wnTc7&)ZT`jmJ+vfRTm23rArks1!JRbJw5c}PBR9{=K$Y3}!vmFHN;dCE(mX1r zU5;|D8z@xM9Tp>K#yp=#d%cVfrR}I+x;ZB_8(!|*11Sn3X6tY0HVcy>r0?FU`YKB9 z{@1pb9fTVuDIhGxbhbU^`IN2oJgh@(lEu*wwu=`sK++=6(VJ0dNfhnMY{bC|uts`9 z48WxyOl^>}!Mzw{g1Z(?yw8$~;Vjm$g!6H39SS2lm(3{IaW-B&Iu+g;eG3ymA5HJe z`A29~i6waDX2r>%vV4ro5|iWYhxA&U94j2bmfX}Wvh)f#Hd<*vGg%5MeBLc@V}PWj z_-Q7kbjT@IdM?|U_vFWptvuza7b6X=O|o?At4mhiJT2R^D}=*SYhocgtg9a@T)SQM zzrYmUrPN+yVsHtkipLla!mrn%N51s(+5z{5cflvIKVG#poXhvXc9{83e}1V`XMdYA zZMgHPsw2by*nLpOF02=FU9rN)q88F2RECUO|KvnEi=i!Ky2Ogb^{O-6i1^AqbF0b% zGYhZx&b_ol3?FRK*yAR79YI~=yVFTj8eT^OVg5>%oo)Jb4JKZWJIxpS0=Fne^v52t zWB#1b@Jz*_sgJWachqOOEWZl3)!t(S7ltlgYa48^X?t+4lAUtekm4K zq+)Nu)$}<8-^d(t*5w>hIX4O6K90!iz8Lt$C*wly%-raZEcU#WpOjomistC_K$n~8 zM2n51W(#35=R@*DcW024FVDtSi=CGHWnwkuT&FI{Jk@96E|&g0)0g0C`1#y*fXVLk zG$^x*$GoMXlrR2c}O>39nls`3&Uq2CMjo)bxf+1$xI8I!$4bO~~D|- zKE(f@Rk(j!g$4oq)lV{){cV-~b1$R>G75+@t35oR_oz#1CHFhZ0jiX4YZ1Pen1J>^ zsH_xF|0<`xW2051XebRLJre!v#FE`m&As~jfHWf0e)H;=UZOHjBM@8xk?JHgBs-zE z*8)v0_8wWARQf7gA@pb}>$K5$cYimp{2iMZ$3bV)Zwn<4Na8UCbcGcZR-bKTCR6P3 zR?{Wt)(wF%?eB5U@hLStJbqZU>Z0t>RNK}!Rx~d;m7_B2yOiKl(ehf^({ZZoR=W>y zsR}#KW*4|aZ*?SVExA^zJMFB}a$1OfO1!T@0?g+Ca976rkYt&Kh@jHm*$~GL_0xH=*)^pW1+O(?^6E- DPu%{c diff --git a/tests/general/testdata/privkey.pem b/tests/general/testdata/privkey.pem deleted file mode 100644 index 0a4d3a0a0..000000000 --- a/tests/general/testdata/privkey.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBAM4Aozh3TMZYcPx7MHlnD8MtyVUjzo6OdT32JwRHzHHNMMm88lNV -fLYIT9C/jgXlDqG0h5wSClMvTQbdihNdFOkCAwEAAQJBAJuMo7KpcpF6iqY7Jtkk -1yQb2KCvTvMZ4rGMwt1akaeDW2noyqCeO675gFBtlizgcRsybealQVQgGX4E5VqF -UJkCIQDzJZZi2jloDXcyyy2rEa4mj4RnrnIYsDMJ55XMWJ9c9wIhANjkY97FSRX3 -WSdRFqXd3Pc4URUho+rCcPibafMOwAUfAiAa58ngXm2DyhmqkTkYePhgY/kuz+ro -OHctXWcCGbxouQIgLC5qAakieC0Ipi+oc2U8a8e3DJzrrRiqtpnB/VcV2nUCIQC2 -DXrpyt6jjVIzs4jI5Cl3QGLL6TZ8FqpyonU/1ARuhA== ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/tests/general/testdata/service-12345.json b/tests/general/testdata/service-12345.json deleted file mode 100644 index 4160d93f5..000000000 --- a/tests/general/testdata/service-12345.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private_key_id": "1936f241be592afc6f3a6d309f75cbf5229d3e75", - "private_key": "-----BEGIN PRIVATE KEY-----\nMIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALatQBvyVfVxdKFT\n3jMHUk0hSEs9Z3WaEw1q+597Fo+f2j5xOIzzzHKX4twWtSYWpSNTaVsFBX7cYpKu\nxYD8oiFnb/Djmud36h4yZsinmoTAi8tn7ldHMi3VICt05IKNRYPU14AQ/FANBvzZ\nxPUxVmf2Q8qZ1/HhXRGE0GLhJGMtAgMBAAECgYAB1BogLXzOyCPyuXQv7pLUUtD2\nb9bpRnGKYNfD8Od46JC2r0txnb8eJocOzOtjRjbA88TKNHKpomsaLMWtVNoKlzMX\n4DdWk0we4knIa2ZNc3rHYQIHVTESYUa3fH/I/t2XBmbiwyYdegfXl7OmxHb9kekk\nQ1HBKq2SA2LRHWydwQJBAPIdT6s1KvUVsdW7JVu3MxMSlSc2dyQV9ay44wuxYaVV\nfvV7BM/J+/oHSh4GU2Os+kqRHOuouHm2TQ3gsQlBsqcCQQDBJ0iDoYZozVQB36eE\nlPAzoK6H+U21rx5EErFNYu97OKWn+z8kwbGtBU8CSJhkY/OQGmpg6MpoJO/Md03Y\nxVoLAkAFeZg1nOwtwqHU3XiIzGnBQqhQzLCBBmYZ08x+lTJKFNbcIj4HnN+v1b5d\nU3NLS7wVN5bZ1WTmi7LOX4hhVzT9AkBBbQQECleT8lENXWvJ3gVLB5d22Xx4GTxA\nRLCoDOYfr/103Ab0dWOwvsaXeG2eO7kJy9jSwKenBTPw50yIK7knAkBC2J/z6X7l\nB/dDRTxdd0gCG7JIy9N3cUgHBmDH2eycmPncWGJ+aZrK1p9NmAytP+Ksi4AGMJX5\nH5cT1I/UOEn1\n-----END PRIVATE KEY-----\n", - "client_email": "12345-is5nq94smihmoa2k0567jab6u6vj278c@developer.gserviceaccount.com", - "client_id": "12345-is5nq94smihmoa2k0567jab6u6vj278c.apps.googleusercontent.com", - "type": "service_account" -} \ No newline at end of file diff --git a/tests/general/testdata/service-rsa-12345.json b/tests/general/testdata/service-rsa-12345.json deleted file mode 100644 index a6a2df0ed..000000000 --- a/tests/general/testdata/service-rsa-12345.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private_key_id": "1936f241be592afc6f3a6d309f75cbf5229d3e75", - "private_key": "-----BEGIN RSA PRIVATE KEY-----MIIBOwIBAAJBAM4Aozh3TMZYcPx7MHlnD8MtyVUjzo6OdT32JwRHzHHNMMm88lNVfLYIT9C/jgXlDqG0h5wSClMvTQbdihNdFOkCAwEAAQJBAJuMo7KpcpF6iqY7Jtkk1yQb2KCvTvMZ4rGMwt1akaeDW2noyqCeO675gFBtlizgcRsybealQVQgGX4E5VqFUJkCIQDzJZZi2jloDXcyyy2rEa4mj4RnrnIYsDMJ55XMWJ9c9wIhANjkY97FSRX3WSdRFqXd3Pc4URUho+rCcPibafMOwAUfAiAa58ngXm2DyhmqkTkYePhgY/kuz+roOHctXWcCGbxouQIgLC5qAakieC0Ipi+oc2U8a8e3DJzrrRiqtpnB/VcV2nUCIQC2DXrpyt6jjVIzs4jI5Cl3QGLL6TZ8FqpyonU/1ARuhA==-----END RSA PRIVATE KEY-----", - "client_email": "12345-is5nq94smihmoa2k0567jab6u6vj278c@developer.gserviceaccount.com", - "client_id": "12345-is5nq94smihmoa2k0567jab6u6vj278c.apps.googleusercontent.com", - "type": "service_account" -} \ No newline at end of file diff --git a/tests/general/testdata/test_public_key.pem b/tests/general/testdata/test_public_key.pem deleted file mode 100644 index ebca23e52..000000000 --- a/tests/general/testdata/test_public_key.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDQjCCAiqgAwIBAgIJAMJ1Z12ZdGgLMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV -BAMTFHRlc3Qtc2VydmljZS1hY2NvdW50MB4XDTExMDgyMzIwNTczNFoXDTIxMDgy -MDIwNTczNFowHzEdMBsGA1UEAxMUdGVzdC1zZXJ2aWNlLWFjY291bnQwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDpbFTjUXd02HFluI2G0kGKp1J5K2F8 -cYr7hKXHcsmKo6S/5g8AEYnnV1fEbiopoGt7UWV4T0LA99K0gqQ7QmvZKvFHXlgR -XJH1aO+ZipVs3ycZOcjBMcw4hspFSi4IyQta64gASFUT5NaxRVGhzAuPlzH09dZQ -RJ0NL54HccGNzEDaLx5usB8t2aRHbE4zRWJlNIsjgWnfVoiXwOv5oRhyfFMIaTu1 -eIp3XP1QAv5cuYS2U4ZJ+J7Gzg6E7t4PWqK7rGjnc5BJsVIoiL77K/xKUWABNgHz -b6JuiEp3LX9f2H5+CKo/IJFWoyIYWdZiu69LZivife9sTXmDnOcZkisRAgMBAAGj -gYAwfjAdBgNVHQ4EFgQU0RkXlevVO2zuTFP/ksFUbNkpm+kwTwYDVR0jBEgwRoAU -0RkXlevVO2zuTFP/ksFUbNkpm+mhI6QhMB8xHTAbBgNVBAMTFHRlc3Qtc2Vydmlj -ZS1hY2NvdW50ggkAwnVnXZl0aAswDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUF -AAOCAQEAT+3VKautn+uV7ZQWbfx6xrGaDZ5wVK9FWOTVKsjdXyp11jtoVkDONLz5 -3J7wgppZWabPargIZUHe9/P6j7QTgNV2na2thGHtVRIRyDECnVrvhCn/IDpMeJjj -IAuysmSITHGEwb4AvRC5HdqfWzBqAvRhjJ2crcHZpx5/KkYZgJz9ylGJCynxpbHU -1aRu4qpkQNB4t4z5EzNOSLkFw9vEtm0hNX76CsNJFd0XDEKDQI2Lsc0WfDzQ1ZQH -UVzIoTmQDkYGylQOBVyxZoGI6fuSo8c2I1BKvsdBGhSPjePNvaKUbmLSwUsranhX -2Y1kn7xbDTUHymZ0+g5rDM9kWmhZfg== ------END CERTIFICATE-----