Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] chore: bump depdendencies #4115

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/Api/ApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ApiTestCase extends TestCase {
public function setUp(): void {
parent::setUp();
$data = json_decode(file_get_contents('openapi-full.json'), true);
$data['servers'][] = ['url' => '/ocs/v2.php/ocsapp/apps/libresign/api/v1'];
$data['servers'][] = ['url' => '/ocs/v2.php/ocsapp/apps/libresign'];
$data = $this->removeBasePath($data);
/** @var OpenApiSchema */
$schema = \ByJG\ApiTools\Base\Schema::getInstance($data);
Expand All @@ -59,7 +59,7 @@ public function setUp(): void {
private function removeBasePath(array $data): array {
$cleaned = [];
foreach ($data['paths'] as $key => $value) {
$key = preg_replace('~^' . '/ocs/v2.php/apps/libresign/api/{apiVersion}' . '~', '', $key);
$key = preg_replace('~^/ocs/v2.php/apps/libresign~', '', $key);
$cleaned[$key] = $value;
}
$data['paths'] = $cleaned;
Expand Down
14 changes: 7 additions & 7 deletions tests/Api/Controller/AccountControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testAccountCreateWithInvalidUuid() {
'password' => 'secret',
'signPassword' => 'secretToSign'
])
->withPath('/account/create/1234564789')
->withPath('/api/v1/account/create/1234564789')
->assertResponseCode(422);

$response = $this->assertRequest();
Expand Down Expand Up @@ -80,7 +80,7 @@ public function testAccountCreateWithSuccess() {
'password' => 'secret',
'signPassword' => 'secretToSign'
])
->withPath('/account/create/' . $signers[0]->getUuid());
->withPath('/api/v1/account/create/' . $signers[0]->getUuid());
$this->markUserExists('[email protected]');

$this->assertRequest();
Expand Down Expand Up @@ -108,7 +108,7 @@ public function testPostProfileFilesWithInvalidData() {
]
]
])
->withPath('/account/files')
->withPath('/api/v1/account/files')
->assertResponseCode(401);

$this->assertRequest();
Expand Down Expand Up @@ -136,7 +136,7 @@ public function testPostAccountAddFilesWithSuccess() {
]
]
])
->withPath('/account/files');
->withPath('/api/v1/account/files');

$this->assertRequest();
}
Expand All @@ -146,7 +146,7 @@ public function testPostAccountAddFilesWithSuccess() {
*/
public function testMeWithoutAuthenticatedUser() {
$this->request
->withPath('/account/me')
->withPath('/api/v1/account/me')
->assertResponseCode(404);

$this->assertRequest();
Expand All @@ -158,7 +158,7 @@ public function testMeWithoutAuthenticatedUser() {
public function testMeWithAuthenticatedUser() {
$this->createAccount('username', 'password');
$this->request
->withPath('/account/me')
->withPath('/api/v1/account/me')
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('username:password')
]);
Expand All @@ -177,7 +177,7 @@ public function testApprovalListWithSuccess() {
]);

$this->request
->withPath('/account/files/approval/list')
->withPath('/api/v1/account/files/approval/list')
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('allowapprove:password')
]);
Expand Down
6 changes: 3 additions & 3 deletions tests/Api/Controller/AdminControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testLoadCertificate() {
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('admintest:password')
])
->withPath('/admin/certificate');
->withPath('/api/v1/admin/certificate');

$this->assertRequest();
}
Expand Down Expand Up @@ -61,7 +61,7 @@ public function testGenerateCertificateWithSuccess() {
'Authorization' => 'Basic ' . base64_encode('admintest:password'),
'Content-Type' => 'application/json'
])
->withPath('/admin/certificate/cfssl')
->withPath('/api/v1/admin/certificate/cfssl')
->withRequestBody($cfsslConfig);

// Make and test request mach with schema
Expand Down Expand Up @@ -99,7 +99,7 @@ public function testGenerateCertificateWithFailure() {
'Authorization' => 'Basic ' . base64_encode('admintest:password'),
'Content-Type' => 'application/json'
])
->withPath('/admin/certificate/openssl')
->withPath('/api/v1/admin/certificate/openssl')
->withRequestBody([
'rootCert' => [
'commonName' => 'CommonName',
Expand Down
12 changes: 6 additions & 6 deletions tests/Api/Controller/FileControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testValidateUsignUuidWithInvalidData() {
$this->mockAppConfig([]);

$this->request
->withPath('/file/validate/uuid/invalid')
->withPath('/api/v1/file/validate/uuid/invalid')
->assertResponseCode(404);

$response = $this->assertRequest();
Expand All @@ -31,7 +31,7 @@ public function testValidateUsignUuidWithInvalidData() {
*/
public function testValidateUsignFileIdWithInvalidData() {
$this->request
->withPath('/file/validate/file_id/171')
->withPath('/api/v1/file/validate/file_id/171')
->assertResponseCode(404);

$response = $this->assertRequest();
Expand Down Expand Up @@ -60,7 +60,7 @@ public function testValidateWithSuccessUsingUnloggedUser() {
]);

$this->request
->withPath('/file/validate/uuid/' . $file->getUuid());
->withPath('/api/v1/file/validate/uuid/' . $file->getUuid());

$response = $this->assertRequest();
$body = json_decode($response->getBody()->getContents(), true);
Expand Down Expand Up @@ -102,7 +102,7 @@ public function testValidateWithSuccessUsingSigner() {
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('username:password')
])
->withPath('/file/validate/uuid/' . $file->getUuid());
->withPath('/api/v1/file/validate/uuid/' . $file->getUuid());

$response = $this->assertRequest();
$body = json_decode($response->getBody()->getContents(), true);
Expand All @@ -120,7 +120,7 @@ public function testControllerListWithEmptyData() {
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('username:password')
])
->withPath('/file/list');
->withPath('/api/v1/file/list');

$response = $this->assertRequest();
$body = json_decode($response->getBody()->getContents(), true);
Expand All @@ -140,7 +140,7 @@ public function testSendNewFile() {
'Authorization' => 'Basic ' . base64_encode('allowrequestsign:password'),
'Content-Type' => 'application/json',
])
->withPath('/file')
->withPath('/api/v1/file')
->withMethod('POST')
->withRequestBody([
'name' => 'test',
Expand Down
6 changes: 3 additions & 3 deletions tests/Api/Controller/FileElementControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testPostSuccess() {

$this->mockAppConfig([]);
$this->request
->withPath('/file-element/' . $file->getUuid())
->withPath('/api/v1/file-element/' . $file->getUuid())
->withMethod('POST')
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('username:password'),
Expand Down Expand Up @@ -68,7 +68,7 @@ public function testPatchSuccess($params) {
extract($params);
$signers = $this->getSignersFromFileId($file->getId());
$this->request
->withPath('/file-element/' . $file->getUuid() . '/' . $fileElementId)
->withPath('/api/v1/file-element/' . $file->getUuid() . '/' . $fileElementId)
->withMethod('PATCH')
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('username:password'),
Expand Down Expand Up @@ -102,7 +102,7 @@ public function testDeleteSuccess($params) {
$this->createAccount('username', 'password');
extract($params);
$this->request
->withPath('/file-element/' . $file->getUuid() . '/' . $fileElementId)
->withPath('/api/v1/file-element/' . $file->getUuid() . '/' . $fileElementId)
->withMethod('DELETE')
->withRequestHeader([
'Authorization' => 'Basic ' . base64_encode('username:password'),
Expand Down
4 changes: 2 additions & 2 deletions tests/Api/Controller/NotifyControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testNotifySignersWithError() {
]
]
])
->withPath('/notify/signers')
->withPath('/api/v1/notify/signers')
->assertResponseCode(401);

$this->assertRequest();
Expand Down Expand Up @@ -70,7 +70,7 @@ public function testNotifySignersWithSuccess() {
]
]
])
->withPath('/notify/signers');
->withPath('/api/v1/notify/signers');

$this->assertRequest();
}
Expand Down
Loading
Loading