Skip to content

Commit

Permalink
add some comment for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
v9n committed Feb 1, 2025
1 parent 580631b commit c0dd863
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/secret.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ describe("secret Tests", () => {
expect(
secrets1.some(item => item.name === secret2.name)
).toBe(false);
expect(
secrets2.some(item => item.name === secret1.name)
).toBe(false);
});
});

Expand Down Expand Up @@ -134,17 +137,21 @@ describe("secret Tests", () => {
workflowId: getNextId(),
});

// we create 2 secret at different level
await client.createSecret(secret1);
await client.createSecret(secret2);

let secrets = await client.listSecrets();
// make sure we got both secret
expect(
secrets.some(item => item.name === secret1.name)
).toBe(true);
expect(
secrets.some(item => item.name === secret2.name)
).toBe(true);

const deleted= await client.deleteSecret({
// delete the one at workflow level and list again, make sure it delete the right one
const deleted = await client.deleteSecret({
name: secret2.name,
workflowId: secret2.workflowId,
});
Expand All @@ -158,9 +165,6 @@ describe("secret Tests", () => {
secrets.some(item => item.name === secret2.name)
).toBe(false);
});



});

describe("updateSecret", () => {
Expand Down

0 comments on commit c0dd863

Please sign in to comment.