Skip to content

Commit

Permalink
test(middleware-sdk-sqs): use mock credential in test (#4697)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored May 3, 2023
1 parent 793a192 commit ede04f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/middleware-sdk-sqs/src/middleware-sdk-sqs.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ const handlerResponse = (body: string) => {
};
};

const credentials = {
accessKeyId: "a",
secretAccessKey: "s",
};

describe("middleware-sdk-sqs", () => {
describe(SQS.name + ` w/ useAwsQuery: ${useAwsQuery}`, () => {
describe("correct md5 hashes", () => {
Expand All @@ -111,6 +116,7 @@ describe("middleware-sdk-sqs", () => {
it("runs md5 checksums on received messages", async () => {
const client = new SQS({
region: "us-west-2",
credentials,
requestHandler: new (class {
async handle(): Promise<any> {
const r = responses();
Expand All @@ -129,6 +135,7 @@ describe("middleware-sdk-sqs", () => {
it("runs md5 checksums on sent messages", async () => {
const client = new SQS({
region: "us-west-2",
credentials,
requestHandler: new (class {
async handle(): Promise<any> {
const r = responses();
Expand All @@ -148,6 +155,7 @@ describe("middleware-sdk-sqs", () => {
it("runs md5 checksums on batch sent messages", async () => {
const client = new SQS({
region: "us-west-2",
credentials,
requestHandler: new (class {
async handle(): Promise<any> {
const r = responses();
Expand Down Expand Up @@ -186,6 +194,7 @@ describe("middleware-sdk-sqs", () => {
it("runs md5 checksums on received messages", async () => {
const client = new SQS({
region: "us-west-2",
credentials,
requestHandler: new (class {
async handle(): Promise<any> {
const r = responses();
Expand Down Expand Up @@ -231,6 +240,7 @@ describe("middleware-sdk-sqs", () => {
it("runs md5 checksums on batch sent messages", async () => {
const client = new SQS({
region: "us-west-2",
credentials,
requestHandler: new (class {
async handle(): Promise<any> {
const r = responses();
Expand Down

0 comments on commit ede04f7

Please sign in to comment.