mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix: set s3 client service to s3 to produce correct headers required by minio
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user