Skip to content

Commit

Permalink
Correct bottleneck vault params. Remove retries in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasia committed Jun 15, 2024
1 parent de807a6 commit 819e385
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-dev-ops-local.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci-dev-ops
name: ci-dev-ops-local

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion packages/ops/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 2,
retries: process.env.CI ? 1 : 1,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand Down
15 changes: 14 additions & 1 deletion packages/ops/test/create-vault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ test.beforeAll(async () => {
config = loadConfiguration();
});

const createVaultWithPause = limiter.wrap(createVault);
const createVaultWithPause = limiter.wrap(
async (
config: any,
isMatured: boolean,
isUpside: boolean,
isTenant: boolean,
upsideVault?: string,
tenantEmail?: string,
override?: { treasuryAddress: string; activityRewardAddress: string; collateralPercentage: number },
): Promise<any> => {
return createVault(config, isMatured, isUpside, isTenant, upsideVault, tenantEmail, override);
},
);

/*
TODO - move param validations and tests to separate classes to simplfy createVault testing.
Expand Down Expand Up @@ -131,6 +143,7 @@ test.describe('Create Vault', async () => {

test('a non-matured, ready, Fixed Yield vault, closed for deposits/redemption, Maturity Check OFF', async () => {
const created = await createVaultWithPause(config, true, false, false);

expect(created).toMatchObject({ type: 'fixed_yield', status: 'ready' });
expect(isPast(created.deposits_opened_at)).toBe(true);
expect(isPast(created.deposits_closed_at)).toBe(true);
Expand Down

0 comments on commit 819e385

Please sign in to comment.