Update mock-server to 8.0.1
This commit is contained in:
parent
ccf1c398f5
commit
8e6c3ee568
6 changed files with 12 additions and 23 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -126,7 +126,7 @@
|
|||
"@indutny/parallel-prettier": "3.0.0",
|
||||
"@indutny/rezip-electron": "1.3.1",
|
||||
"@indutny/symbolicate-mac": "2.3.0",
|
||||
"@signalapp/mock-server": "7.1.3",
|
||||
"@signalapp/mock-server": "8.0.1",
|
||||
"@storybook/addon-a11y": "8.1.11",
|
||||
"@storybook/addon-actions": "8.1.11",
|
||||
"@storybook/addon-controls": "8.1.11",
|
||||
|
@ -7296,9 +7296,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@signalapp/mock-server": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@signalapp/mock-server/-/mock-server-7.1.3.tgz",
|
||||
"integrity": "sha512-Xvpeai+E0mhz6WHSycYuY31y5saCNJYX7ioDn1Q0LqUAOUKGVQjnWvdxeXLPKv8C06mbWn0lP16o9swClWVsmg==",
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@signalapp/mock-server/-/mock-server-8.0.1.tgz",
|
||||
"integrity": "sha512-qfyBOtMmQ3RF3Kig0DTafrxUx8MZ2hB+5H6ZJVV1lQS022U6bOHiVjZyAJ0uZgU98FJZIXlT/zWJ24kFl6/pGQ==",
|
||||
"dev": true,
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
"@indutny/parallel-prettier": "3.0.0",
|
||||
"@indutny/rezip-electron": "1.3.1",
|
||||
"@indutny/symbolicate-mac": "2.3.0",
|
||||
"@signalapp/mock-server": "7.1.3",
|
||||
"@signalapp/mock-server": "8.0.1",
|
||||
"@storybook/addon-a11y": "8.1.11",
|
||||
"@storybook/addon-actions": "8.1.11",
|
||||
"@storybook/addon-controls": "8.1.11",
|
||||
|
|
|
@ -566,6 +566,8 @@ export class BackupImportStream extends Writable {
|
|||
|
||||
strictAssert(Bytes.isNotEmpty(profileKey), 'Missing profile key');
|
||||
await storage.put('profileKey', profileKey);
|
||||
this.ourConversation.profileKey = Bytes.toBase64(profileKey);
|
||||
await this.updateConversation(this.ourConversation);
|
||||
|
||||
if (username != null) {
|
||||
me.username = username;
|
||||
|
|
|
@ -2,16 +2,11 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import { pipeline } from 'node:stream/promises';
|
||||
import { createWriteStream } from 'node:fs';
|
||||
import { mkdir } from 'node:fs/promises';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { Bootstrap } from './fixtures';
|
||||
import { generateBackup } from '../../test-both/helpers/generateBackup';
|
||||
|
||||
Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
|
||||
const { phone, cdn3Path } = bootstrap;
|
||||
const { phone, server } = bootstrap;
|
||||
|
||||
const { backupId, stream: backupStream } = generateBackup({
|
||||
aci: phone.device.aci,
|
||||
|
@ -20,14 +15,8 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
|
|||
conversations: 1000,
|
||||
messages: 60 * 1000,
|
||||
});
|
||||
const backupFolder = join(
|
||||
cdn3Path,
|
||||
'backups',
|
||||
backupId.toString('base64url')
|
||||
);
|
||||
await mkdir(backupFolder, { recursive: true });
|
||||
const fileStream = createWriteStream(join(backupFolder, 'backup'));
|
||||
await pipeline(backupStream, fileStream);
|
||||
|
||||
await server.storeBackupOnCdn(backupId, backupStream);
|
||||
|
||||
const importStart = Date.now();
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ describe('attachments', function (this: Mocha.Suite) {
|
|||
bootstrap.getAbsoluteAttachmentPath(ciphertextPath)
|
||||
);
|
||||
|
||||
bootstrap.server.storeAttachmentOnCdn(
|
||||
await bootstrap.server.storeAttachmentOnCdn(
|
||||
cdnNumber,
|
||||
cdnKey,
|
||||
ciphertextCatWithNonZeroPadding
|
||||
|
|
|
@ -95,9 +95,7 @@ export async function encryptAndUploadAttachment({
|
|||
uploadForm = await server.getAttachmentUploadForm();
|
||||
break;
|
||||
case 'backup':
|
||||
uploadForm = await server.getBackupMediaUploadForm(
|
||||
await backupsService.credentials.getHeadersForToday()
|
||||
);
|
||||
uploadForm = await backupsService.api.getMediaUploadForm();
|
||||
break;
|
||||
default:
|
||||
throw missingCaseError(uploadType);
|
||||
|
|
Loading…
Reference in a new issue