Skip to content

Commit e9ee529

Browse files
committed
test: fix tests
1 parent 491cc48 commit e9ee529

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/middleware-sdk-s3/src/middleware-sdk-s3.integ.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ describe("middleware-sdk-s3", () => {
7070
hostname: "mybucket.com",
7171
port: 8888,
7272
path: "/my-bucket-path/my-key",
73+
headers: {
74+
host: "mybucket.com:8888",
75+
},
7376
});
7477

7578
await client.putObject({

packages/middleware-sdk-s3/src/validate-bucket-name.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe("validateBucketNameMiddleware", () => {
1111
});
1212

1313
it("throws error if Bucket parameter contains '/'", async () => {
14-
const handler = validateBucketNameMiddleware()(mockNextHandler, {} as any);
14+
const handler = validateBucketNameMiddleware({} as any)(mockNextHandler, {} as any);
1515
const bucket = "bucket/part/of/key";
1616
let error;
1717
try {
@@ -29,7 +29,7 @@ describe("validateBucketNameMiddleware", () => {
2929
});
3030

3131
it("doesn't throw error if Bucket parameter has no '/'", async () => {
32-
const handler = validateBucketNameMiddleware()(mockNextHandler, {} as any);
32+
const handler = validateBucketNameMiddleware({} as any)(mockNextHandler, {} as any);
3333
const args = {
3434
input: {
3535
Bucket: "bucket",
@@ -42,7 +42,7 @@ describe("validateBucketNameMiddleware", () => {
4242

4343
it("should not validate bucket name if the bucket name is an ARN", async () => {
4444
mockValidateArn.mockReturnValue(true);
45-
const handler = validateBucketNameMiddleware()(mockNextHandler, {} as any);
45+
const handler = validateBucketNameMiddleware({} as any)(mockNextHandler, {} as any);
4646
const args = {
4747
input: {
4848
Bucket: "arn:aws:s3:us-east-1:123456789012:accesspoint/myendpoint",

private/aws-client-api-test/src/client-interface-tests/client-s3/impl/initializeWithMaximalConfiguration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export const initializeWithMaximalConfiguration = () => {
116116
disableS3ExpressSessionAuth: false,
117117
useGlobalEndpoint: false,
118118
signingEscapePath: false,
119+
bucketEndpoint: false,
119120
};
120121

121122
const s3 = new S3Client(config);

0 commit comments

Comments
 (0)