Merge branch 'master' into feat-usage-refactor
This commit is contained in:
commit
1e5c94c2c6
|
@ -10,30 +10,6 @@ x-logging: &x-logging
|
|||
max-file: '5'
|
||||
max-size: '10m'
|
||||
|
||||
x-env-storage: &x-env-storage |-
|
||||
_APP_STORAGE_DEVICE
|
||||
_APP_STORAGE_S3_ACCESS_KEY
|
||||
_APP_STORAGE_S3_SECRET
|
||||
_APP_STORAGE_S3_REGION
|
||||
_APP_STORAGE_S3_BUCKET
|
||||
_APP_STORAGE_DO_SPACES_ACCESS_KEY
|
||||
_APP_STORAGE_DO_SPACES_SECRET
|
||||
_APP_STORAGE_DO_SPACES_REGION
|
||||
_APP_STORAGE_DO_SPACES_BUCKET
|
||||
_APP_STORAGE_BACKBLAZE_ACCESS_KEY
|
||||
_APP_STORAGE_BACKBLAZE_SECRET
|
||||
_APP_STORAGE_BACKBLAZE_REGION
|
||||
_APP_STORAGE_BACKBLAZE_BUCKET
|
||||
_APP_STORAGE_DO_SPACES_BUCKET
|
||||
_APP_STORAGE_LINODE_ACCESS_KEY
|
||||
_APP_STORAGE_LINODE_SECRET
|
||||
_APP_STORAGE_LINODE_REGION
|
||||
_APP_STORAGE_LINODE_BUCKET
|
||||
_APP_STORAGE_WASABI_ACCESS_KEY
|
||||
_APP_STORAGE_WASABI_SECRET
|
||||
_APP_STORAGE_WASABI_REGION
|
||||
_APP_STORAGE_WASABI_BUCKET
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
@ -155,7 +131,27 @@ services:
|
|||
- _APP_STORAGE_ANTIVIRUS
|
||||
- _APP_STORAGE_ANTIVIRUS_HOST
|
||||
- _APP_STORAGE_ANTIVIRUS_PORT
|
||||
- *x-env-storage
|
||||
- _APP_STORAGE_DEVICE
|
||||
- _APP_STORAGE_S3_ACCESS_KEY
|
||||
- _APP_STORAGE_S3_SECRET
|
||||
- _APP_STORAGE_S3_REGION
|
||||
- _APP_STORAGE_S3_BUCKET
|
||||
- _APP_STORAGE_DO_SPACES_ACCESS_KEY
|
||||
- _APP_STORAGE_DO_SPACES_SECRET
|
||||
- _APP_STORAGE_DO_SPACES_REGION
|
||||
- _APP_STORAGE_DO_SPACES_BUCKET
|
||||
- _APP_STORAGE_BACKBLAZE_ACCESS_KEY
|
||||
- _APP_STORAGE_BACKBLAZE_SECRET
|
||||
- _APP_STORAGE_BACKBLAZE_REGION
|
||||
- _APP_STORAGE_BACKBLAZE_BUCKET
|
||||
- _APP_STORAGE_LINODE_ACCESS_KEY
|
||||
- _APP_STORAGE_LINODE_SECRET
|
||||
- _APP_STORAGE_LINODE_REGION
|
||||
- _APP_STORAGE_LINODE_BUCKET
|
||||
- _APP_STORAGE_WASABI_ACCESS_KEY
|
||||
- _APP_STORAGE_WASABI_SECRET
|
||||
- _APP_STORAGE_WASABI_REGION
|
||||
- _APP_STORAGE_WASABI_BUCKET
|
||||
- _APP_FUNCTIONS_SIZE_LIMIT
|
||||
- _APP_FUNCTIONS_TIMEOUT
|
||||
- _APP_FUNCTIONS_BUILD_TIMEOUT
|
||||
|
@ -308,7 +304,27 @@ services:
|
|||
- _APP_DB_SCHEMA
|
||||
- _APP_DB_USER
|
||||
- _APP_DB_PASS
|
||||
- *x-env-storage
|
||||
- _APP_STORAGE_DEVICE
|
||||
- _APP_STORAGE_S3_ACCESS_KEY
|
||||
- _APP_STORAGE_S3_SECRET
|
||||
- _APP_STORAGE_S3_REGION
|
||||
- _APP_STORAGE_S3_BUCKET
|
||||
- _APP_STORAGE_DO_SPACES_ACCESS_KEY
|
||||
- _APP_STORAGE_DO_SPACES_SECRET
|
||||
- _APP_STORAGE_DO_SPACES_REGION
|
||||
- _APP_STORAGE_DO_SPACES_BUCKET
|
||||
- _APP_STORAGE_BACKBLAZE_ACCESS_KEY
|
||||
- _APP_STORAGE_BACKBLAZE_SECRET
|
||||
- _APP_STORAGE_BACKBLAZE_REGION
|
||||
- _APP_STORAGE_BACKBLAZE_BUCKET
|
||||
- _APP_STORAGE_LINODE_ACCESS_KEY
|
||||
- _APP_STORAGE_LINODE_SECRET
|
||||
- _APP_STORAGE_LINODE_REGION
|
||||
- _APP_STORAGE_LINODE_BUCKET
|
||||
- _APP_STORAGE_WASABI_ACCESS_KEY
|
||||
- _APP_STORAGE_WASABI_SECRET
|
||||
- _APP_STORAGE_WASABI_REGION
|
||||
- _APP_STORAGE_WASABI_BUCKET
|
||||
- _APP_LOGGING_PROVIDER
|
||||
- _APP_LOGGING_CONFIG
|
||||
- _APP_EXECUTOR_SECRET
|
||||
|
@ -476,7 +492,27 @@ services:
|
|||
- OPEN_RUNTIMES_NETWORK
|
||||
- _APP_LOGGING_PROVIDER
|
||||
- _APP_LOGGING_CONFIG
|
||||
- *x-env-storage
|
||||
- _APP_STORAGE_DEVICE
|
||||
- _APP_STORAGE_S3_ACCESS_KEY
|
||||
- _APP_STORAGE_S3_SECRET
|
||||
- _APP_STORAGE_S3_REGION
|
||||
- _APP_STORAGE_S3_BUCKET
|
||||
- _APP_STORAGE_DO_SPACES_ACCESS_KEY
|
||||
- _APP_STORAGE_DO_SPACES_SECRET
|
||||
- _APP_STORAGE_DO_SPACES_REGION
|
||||
- _APP_STORAGE_DO_SPACES_BUCKET
|
||||
- _APP_STORAGE_BACKBLAZE_ACCESS_KEY
|
||||
- _APP_STORAGE_BACKBLAZE_SECRET
|
||||
- _APP_STORAGE_BACKBLAZE_REGION
|
||||
- _APP_STORAGE_BACKBLAZE_BUCKET
|
||||
- _APP_STORAGE_LINODE_ACCESS_KEY
|
||||
- _APP_STORAGE_LINODE_SECRET
|
||||
- _APP_STORAGE_LINODE_REGION
|
||||
- _APP_STORAGE_LINODE_BUCKET
|
||||
- _APP_STORAGE_WASABI_ACCESS_KEY
|
||||
- _APP_STORAGE_WASABI_SECRET
|
||||
- _APP_STORAGE_WASABI_REGION
|
||||
- _APP_STORAGE_WASABI_BUCKET
|
||||
- DOCKERHUB_PULL_USERNAME
|
||||
- DOCKERHUB_PULL_PASSWORD
|
||||
|
||||
|
|
|
@ -124,35 +124,7 @@ class HTTPTest extends Scope
|
|||
$this->client->setEndpoint($previousEndpoint);
|
||||
}
|
||||
|
||||
// public function testSpecSwagger2()
|
||||
// {
|
||||
// $response = $this->client->call(Client::METHOD_GET, '/specs/swagger2?platform=client', [
|
||||
// 'content-type' => 'application/json',
|
||||
// ], []);
|
||||
|
||||
// if(!file_put_contents(__DIR__ . '/../../resources/swagger2.json', json_encode($response['body']))) {
|
||||
// throw new Exception('Failed to save spec file');
|
||||
// }
|
||||
|
||||
// $client = new Client();
|
||||
// $client->setEndpoint('https://validator.swagger.io');
|
||||
|
||||
// /**
|
||||
// * Test for SUCCESS
|
||||
// */
|
||||
// $response = $client->call(Client::METHOD_POST, '/validator/debug', [
|
||||
// 'content-type' => 'application/json',
|
||||
// ], json_decode(file_get_contents(realpath(__DIR__ . '/../../resources/swagger2.json')), true));
|
||||
|
||||
// $response['body'] = json_decode($response['body'], true);
|
||||
|
||||
// $this->assertEquals(200, $response['headers']['status-code']);
|
||||
// $this->assertTrue(empty($response['body']));
|
||||
|
||||
// unlink(realpath(__DIR__ . '/../../resources/swagger2.json'));
|
||||
// }
|
||||
|
||||
public function testSpecOpenAPI3()
|
||||
public function testSpecs()
|
||||
{
|
||||
$directory = __DIR__ . '/../../../app/config/specs/';
|
||||
|
||||
|
@ -160,16 +132,25 @@ class HTTPTest extends Scope
|
|||
$client = new Client();
|
||||
$client->setEndpoint('https://validator.swagger.io');
|
||||
|
||||
$versions = [
|
||||
'latest',
|
||||
'0.15.x',
|
||||
'0.14.x',
|
||||
];
|
||||
|
||||
foreach ($files as $file) {
|
||||
if (in_array($file, ['.', '..'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
(strpos($file, 'latest') === false) &&
|
||||
(strpos($file, '0.12.x') === false) &&
|
||||
(strpos($file, '0.13.x') === false)
|
||||
) {
|
||||
$allowed = false;
|
||||
foreach ($versions as $version) {
|
||||
if (\str_contains($file, $version)) {
|
||||
$allowed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$allowed) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue