Skip to content

Commit

Permalink
test: fix pipeline failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
floydspace committed Sep 27, 2024
1 parent 55f4fb3 commit ab66fbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions packages/secrets-manager/test/ConfigProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
} from "@effect-aws/client-secrets-manager";
import { Arg } from "@fluffy-spoon/substitute";
import { Config, ConfigError, Effect, Exit, Layer, Secret } from "effect";
import { describe, expect, it } from "vitest";
import { SubstituteBuilder } from "./utils";
import { fromSecretsManager } from "../src/ConfigProvider";

Expand All @@ -34,7 +33,7 @@ describe("fromSecretsManager", () => {
);

expect(result).toEqual(Exit.succeed("mocked-secret"));
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should load default value if the secret does not exist", async () => {
Expand Down Expand Up @@ -64,7 +63,7 @@ describe("fromSecretsManager", () => {
);

expect(result).toEqual(Exit.succeed("mocked-default-value"));
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should fail if request is invalid", async () => {
Expand Down Expand Up @@ -101,7 +100,7 @@ describe("fromSecretsManager", () => {
),
),
);
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should fail if the secret does not exist", async () => {
Expand Down Expand Up @@ -136,7 +135,7 @@ describe("fromSecretsManager", () => {
),
),
);
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should fail if the secret is empty", async () => {
Expand Down Expand Up @@ -166,6 +165,6 @@ describe("fromSecretsManager", () => {
),
),
);
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});
});
11 changes: 5 additions & 6 deletions packages/ssm/test/ConfigProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { InvalidKeyId, ParameterNotFound } from "@aws-sdk/client-ssm";
import { BaseSSMServiceLayer, SSMClientInstance } from "@effect-aws/client-ssm";
import { Arg } from "@fluffy-spoon/substitute";
import { Config, ConfigError, Effect, Exit, Layer, Secret } from "effect";
import { describe, expect, it } from "vitest";
import { SubstituteBuilder } from "./utils";
import { fromParameterStore } from "../src/ConfigProvider";

Expand All @@ -28,7 +27,7 @@ describe("fromParameterStore", () => {
);

expect(result).toEqual(Exit.succeed("mocked-parameter"));
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should load default value if the parameter does not exist", async () => {
Expand Down Expand Up @@ -58,7 +57,7 @@ describe("fromParameterStore", () => {
);

expect(result).toEqual(Exit.succeed("mocked-default-value"));
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should fail if request is invalid", async () => {
Expand Down Expand Up @@ -95,7 +94,7 @@ describe("fromParameterStore", () => {
),
),
);
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should fail if the parameter does not exist", async () => {
Expand Down Expand Up @@ -130,7 +129,7 @@ describe("fromParameterStore", () => {
),
),
);
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});

it("should fail if the parameter is empty", async () => {
Expand Down Expand Up @@ -160,6 +159,6 @@ describe("fromParameterStore", () => {
),
),
);
clientSubstitute.received(1).send(Arg.any(), {});
clientSubstitute.received(1).send(Arg.any(), Arg.any());
});
});

0 comments on commit ab66fbe

Please sign in to comment.