Fix first-time Object Storage setup through custom handler

This commit is contained in:
vorotamoroz
2026-09-06 04:07:20 +00:00
parent a5056ab157
commit 59188872fc
5 changed files with 114 additions and 4 deletions
+2
View File
@@ -19,6 +19,7 @@ export type SetupState = {
endpoint: string;
bucket: string;
bucketPrefix: string;
useCustomRequestHandler: boolean;
p2pEnabled: boolean;
p2pRelays: string;
p2pRoomId: string;
@@ -354,6 +355,7 @@ export async function readSetupState(cliBinary: string, environment: NodeJS.Proc
"endpoint:settings.endpoint||'',",
"bucket:settings.bucket||'',",
"bucketPrefix:settings.bucketPrefix||'',",
"useCustomRequestHandler:settings.useCustomRequestHandler===true,",
"p2pEnabled:settings.P2P_Enabled===true,",
"p2pRelays:settings.P2P_relays||'',",
"p2pRoomId:settings.P2P_roomID||'',",
@@ -107,6 +107,7 @@ async function generateBootstrapSetupURI(
region: objectStorage.region,
force_path_style: String(objectStorage.forcePathStyle),
bucket_prefix: bucketPrefix,
use_custom_request_handler: "true",
passphrase: randomBytes(24).toString("base64url"),
uri_passphrase: setupPassphrase,
});
@@ -285,6 +286,11 @@ async function main(): Promise<void> {
bucketPrefix,
"The first device did not activate the unique bucket prefix."
);
assertEqual(
firstState.useCustomRequestHandler,
true,
"The first device did not activate the Custom HTTP Handler."
);
await writeNote(context.cliBinary, sessionA.cliEnv, noteFromFirst, firstContent);
await pushLocalChanges(context.cliBinary, sessionA.cliEnv);
@@ -330,6 +336,11 @@ async function main(): Promise<void> {
bucketPrefix,
"The second device did not import the unique bucket prefix."
);
assertEqual(
secondState.useCustomRequestHandler,
true,
"The second device did not import the Custom HTTP Handler setting."
);
await pushLocalChanges(context.cliBinary, sessionB.cliEnv);
await waitForPathContent(vaultB, noteFromFirst, firstContent);
screenshots.push(