Skip to content

Commit d60096c

Browse files
committed
Revert "fix(LLMO-4070): seed S3 config in IT harness to fix PATCH /sites/:id/:auditType 500s"
This reverts commit c0d92c3.
1 parent 1846a37 commit d60096c

1 file changed

Lines changed: 1 addition & 58 deletions

File tree

test/it/postgres/setup.js

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
import { execSync } from 'child_process';
1515
import { fileURLToPath } from 'url';
1616
import path from 'path';
17-
import {
18-
S3Client, CreateBucketCommand, HeadBucketCommand, PutObjectCommand,
19-
} from '@aws-sdk/client-s3';
17+
import { S3Client, CreateBucketCommand, HeadBucketCommand } from '@aws-sdk/client-s3';
2018

2119
const __dirname = path.dirname(fileURLToPath(import.meta.url));
2220
const COMPOSE_FILE = path.join(__dirname, 'docker-compose.yml');
@@ -88,60 +86,6 @@ async function ensureMinIoBucket() {
8886
}
8987
}
9088

91-
/**
92-
* Creates the MinIO config bucket and seeds the global SpaceCat configuration.
93-
* Configuration is stored in S3 (not PostgREST), so PATCH /sites/:id/:auditType
94-
* needs this object to resolve the registered handlers list.
95-
*/
96-
async function ensureMinIOConfigBucket() {
97-
const s3 = new S3Client({
98-
region: 'us-east-1',
99-
endpoint: `http://localhost:${MINIO_PORT}`,
100-
forcePathStyle: true,
101-
credentials: { accessKeyId: 'minioadmin', secretAccessKey: 'minioadmin' },
102-
});
103-
104-
const bucket = 'dummy-config-bucket';
105-
try {
106-
await s3.send(new HeadBucketCommand({ Bucket: bucket }));
107-
} catch {
108-
await s3.send(new CreateBucketCommand({ Bucket: bucket }));
109-
}
110-
111-
const handler = { enabledByDefault: true, productCodes: ['spacecat'] };
112-
const config = {
113-
handlers: {
114-
'alt-text': handler,
115-
apex: handler,
116-
'broken-backlinks': handler,
117-
canonical: handler,
118-
cwv: handler,
119-
faqs: handler,
120-
headings: handler,
121-
hreflang: handler,
122-
'internal-links': handler,
123-
'llm-blocked': handler,
124-
'meta-tags': handler,
125-
'missing-structured-data': handler,
126-
prerender: handler,
127-
readability: handler,
128-
sitemap: handler,
129-
'structured-data': handler,
130-
summarization: handler,
131-
toc: handler,
132-
},
133-
jobs: [],
134-
queues: { auditJobsQueue: 'https://sqs.us-east-1.amazonaws.com/000000000000/dummy' },
135-
};
136-
137-
await s3.send(new PutObjectCommand({
138-
Bucket: bucket,
139-
Key: 'config/spacecat/global-config.json',
140-
Body: JSON.stringify(config),
141-
ContentType: 'application/json',
142-
}));
143-
}
144-
14589
/**
14690
* Starts PostgreSQL + PostgREST + MinIO via docker compose and waits for readiness.
14791
*
@@ -160,7 +104,6 @@ export async function startPostgres() {
160104
]);
161105

162106
await ensureMinIoBucket();
163-
await ensureMinIOConfigBucket();
164107

165108
return POSTGREST_URL;
166109
}

0 commit comments

Comments
 (0)