Merge pull request #275 from bknd-io/fix/s3-client-minio

fix: set s3 client service to s3 to produce correct headers required by minio
This commit is contained in:
dswbx
2025-09-25 09:28:52 +02:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -22,6 +22,19 @@ afterAll(() => {
cleanup();
}); */
describe("StorageS3Adapter", async () => {
test("verify client's service is set to s3", async () => {
const adapter = new StorageS3Adapter({
access_key: "",
secret_access_key: "",
url: "https://localhost",
});
// this is important for minio to produce the correct headers
// and it won't harm s3 or r2
expect(adapter.client.service).toBe("s3");
});
});
describe.skipIf(ALL_TESTS)("StorageS3Adapter", async () => {
if (ALL_TESTS) return;

View File

@@ -45,6 +45,7 @@ export class StorageS3Adapter extends StorageAdapter {
accessKeyId: config.access_key,
secretAccessKey: config.secret_access_key,
retries: isDebug() ? 0 : 10,
service: "s3",
},
{
convertParams: "pascalToKebab",