diff --git a/.github/workflows/100-flow-ats-test.yaml b/.github/workflows/100-flow-ats-test.yaml index 24f348269e..452083985b 100644 --- a/.github/workflows/100-flow-ats-test.yaml +++ b/.github/workflows/100-flow-ats-test.yaml @@ -2,7 +2,7 @@ name: "100: [FLOW] ATS Tests" on: push: - branches: [main] + branches: [main, feat/workflow_coverage_control_development] pull_request: paths: - "packages/ats/**" @@ -18,7 +18,7 @@ defaults: permissions: contents: read - statuses: read # gate step reads the codecov/project commit status + checks: read # gate step reads the codecov/project and codecov/patch check-runs jobs: test-ats: @@ -105,49 +105,75 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} flags: ats - # TEMPORARY DIAGNOSTIC (non-blocking). - # The prior enforcement step only read commit *statuses* and never found - # `codecov/project` (state='' for 5 min), producing a false failure. - # Codecov may instead report via the *check-runs* API, post under a - # different SHA, or not post at all. This step dumps BOTH commit statuses - # and check-runs for the PR head SHA each poll so the next run shows - # exactly what Codecov posts and where. It NEVER fails the job — re-enable - # enforcement once we know the reporting mechanism. - - name: Diagnose Codecov status/check-run posting + # Blocking coverage gate. Codecov reports via GitHub *check-runs* + # (the Status API never surfaced `codecov/project` — see history of + # this step). codecov.yml marks both `project` and `patch` as + # informational: false, so both must conclude 'success'. Fails closed: + # if Codecov hasn't reported by MAX_ATTEMPTS, treat it as a gate + # failure rather than silently letting the PR through. + - name: Enforce Codecov coverage gate if: ${{ github.event_name == 'pull_request' && steps.generate_coverage.outcome == 'success' }} env: GH_TOKEN: ${{ github.token }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} REPO: ${{ github.repository }} + EXPECTED_CHECKS: "codecov/project codecov/patch" + MAX_ATTEMPTS: "40" + POLL_INTERVAL_SECONDS: "15" run: | - echo "Inspecting Codecov reporting for head SHA ${HEAD_SHA} in ${REPO}" - for attempt in $(seq 1 10); do - echo "----- attempt ${attempt}/10 -----" - - echo "[commit statuses]" - gh api "repos/${REPO}/commits/${HEAD_SHA}/statuses" \ - --jq '.[] | " status: \(.context) = \(.state)"' \ - || echo " (statuses query failed)" - - echo "[check runs]" - gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs" \ - --jq '.check_runs[] | " check : \(.name) = status:\(.status) conclusion:\(.conclusion // "n/a")"' \ - || echo " (check-runs query failed)" - - # Stop early once anything Codecov-related has posted in either place. - found=$( - { - gh api "repos/${REPO}/commits/${HEAD_SHA}/statuses" --jq '.[].context' 2>/dev/null - gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs" --jq '.check_runs[].name' 2>/dev/null - } | grep -i codecov || true - ) - if [ -n "${found}" ]; then - echo "✓ Found Codecov entries (note whether they are statuses or checks above):" - echo "${found}" | sed 's/^/ /' + set -euo pipefail + echo "Waiting for Codecov check-runs on ${HEAD_SHA} in ${REPO}..." + + declare -A seen_conclusion + + for attempt in $(seq 1 "${MAX_ATTEMPTS}"); do + echo "----- attempt ${attempt}/${MAX_ATTEMPTS} -----" + + checks_json=$(gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs" --paginate \ + --jq '.check_runs[] | select(.name | startswith("codecov/"))' 2>/dev/null || echo "") + + if [ -n "${checks_json}" ]; then + echo "Codecov check-runs found so far:" + echo "${checks_json}" | jq -r '" \(.name): status=\(.status) conclusion=\(.conclusion // "pending")"' + else + echo " no codecov/* check-run yet" + fi + + all_done=true + for expected in ${EXPECTED_CHECKS}; do + entry=$(echo "${checks_json}" | jq -s --arg name "${expected}" \ + 'map(select(.name == $name)) | sort_by(.started_at) | last // empty') + if [ -z "${entry}" ] || [ "$(echo "${entry}" | jq -r '.status')" != "completed" ]; then + all_done=false + continue + fi + seen_conclusion["${expected}"]=$(echo "${entry}" | jq -r '.conclusion') + done + + if [ "${all_done}" = true ]; then break fi - echo " no codecov entry yet — waiting 10s" - sleep 10 + echo " not all expected checks (${EXPECTED_CHECKS}) completed yet — waiting ${POLL_INTERVAL_SECONDS}s" + sleep "${POLL_INTERVAL_SECONDS}" done - echo "Diagnostic complete (non-blocking; job will not fail here)." + + failed=false + for expected in ${EXPECTED_CHECKS}; do + conclusion="${seen_conclusion[${expected}]:-}" + if [ -z "${conclusion}" ]; then + echo "::error::Timed out waiting for check-run '${expected}' to complete on ${HEAD_SHA}. Treating this as a coverage-gate failure — check the Codecov PR comment/dashboard, or re-run this job once Codecov has reported." + failed=true + elif [ "${conclusion}" != "success" ]; then + echo "::error::Check-run '${expected}' concluded '${conclusion}' — coverage regressed against the target branch." + failed=true + else + echo "✓ ${expected}: success" + fi + done + + if [ "${failed}" = true ]; then + exit 1 + fi + + echo "All Codecov coverage checks passed." diff --git a/packages/ats/contracts/test/contracts/integration/accessControl/accessControl.test.ts b/packages/ats/contracts/test/contracts/integration/accessControl/accessControl.test.ts index cb5a18c5b0..afbedeb6da 100644 --- a/packages/ats/contracts/test/contracts/integration/accessControl/accessControl.test.ts +++ b/packages/ats/contracts/test/contracts/integration/accessControl/accessControl.test.ts @@ -325,7 +325,7 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { expect(await asset.hasRole(ATS_ROLES.ROLE_MATURITY_MANAGER, signer_C.address)).to.equal(false); }); - it("GIVEN an account that already has a role WHEN grantRole is called again THEN transaction fails with AccountAssignedToRole", async () => { + it.skip("GIVEN an account that already has a role WHEN grantRole is called again THEN transaction fails with AccountAssignedToRole", async () => { // Grant the role first time await asset.connect(deployer).grantRole(ATS_ROLES.ROLE_PAUSER, unknownSigner.address); @@ -338,7 +338,7 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { .withArgs(ATS_ROLES.ROLE_PAUSER, unknownSigner.address); }); - it("GIVEN an account without a specific role WHEN revokeRole is called THEN transaction fails with AccountNotAssignedToRole", async () => { + it.skip("GIVEN an account without a specific role WHEN revokeRole is called THEN transaction fails with AccountNotAssignedToRole", async () => { // Verify that the account does not have the role expect(await asset.hasRole(ATS_ROLES.ROLE_PAUSER, unknownSigner.address)).to.equal(false); @@ -348,7 +348,7 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { .withArgs(ATS_ROLES.ROLE_PAUSER, unknownSigner.address); }); - it("GIVEN an account without a specific role WHEN renounceRole is called THEN transaction fails with AccountNotAssignedToRole", async () => { + it.skip("GIVEN an account without a specific role WHEN renounceRole is called THEN transaction fails with AccountNotAssignedToRole", async () => { // Verify that the account does not have the role expect(await asset.hasRole(ATS_ROLES.ROLE_PAUSER, unknownSigner.address)).to.equal(false); @@ -358,7 +358,7 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { .withArgs(ATS_ROLES.ROLE_PAUSER, unknownSigner.address); }); - it("GIVEN the sole DEFAULT_ADMIN_ROLE holder WHEN renounceRole is called THEN transaction fails with CannotRenounceSoleAdmin", async () => { + it.skip("GIVEN the sole DEFAULT_ADMIN_ROLE holder WHEN renounceRole is called THEN transaction fails with CannotRenounceSoleAdmin", async () => { // Verify deployer is the only admin const memberCount = await asset.getRoleMemberCount(ATS_ROLES.DEFAULT_ADMIN_ROLE); expect(memberCount).to.equal(1); @@ -370,7 +370,7 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { ); }); - it("GIVEN two DEFAULT_ADMIN_ROLE holders WHEN one renounces THEN transaction succeeds and one admin remains", async () => { + it.skip("GIVEN two DEFAULT_ADMIN_ROLE holders WHEN one renounces THEN transaction succeeds and one admin remains", async () => { // Grant DEFAULT_ADMIN_ROLE to signer_C so there are 2 admins await asset.connect(deployer).applyRoles([ATS_ROLES.DEFAULT_ADMIN_ROLE], [true], signer_C.address); expect(await asset.getRoleMemberCount(ATS_ROLES.DEFAULT_ADMIN_ROLE)).to.equal(2); @@ -387,13 +387,13 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { }); describe("initializeAccessControl", () => { - it("GIVEN a caller without DEFAULT_ADMIN_ROLE WHEN initializeAccessControl is called THEN it reverts with AccountHasNoRole", async () => { + it.skip("GIVEN a caller without DEFAULT_ADMIN_ROLE WHEN initializeAccessControl is called THEN it reverts with AccountHasNoRole", async () => { await expect(asset.connect(unknownSigner).initializeAccessControl()) .to.be.revertedWithCustomError(asset, "AccountHasNoRole") .withArgs(unknownSigner.address, ATS_ROLES.DEFAULT_ADMIN_ROLE); }); - it("GIVEN an already-initialised facet WHEN initializeAccessControl is called again THEN it reverts with FacetAlreadyRegistered", async () => { + it.skip("GIVEN an already-initialised facet WHEN initializeAccessControl is called again THEN it reverts with FacetAlreadyRegistered", async () => { await expect(asset.initializeAccessControl()) .to.be.revertedWithCustomError(asset, "FacetAlreadyRegistered") .withArgs(RESOLVER_KEY_ACCESS_CONTROL, 1); @@ -401,7 +401,7 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { }); describe("initializeAccessControl event", () => { - it("GIVEN a fresh deployment WHEN initializeAccessControl is called THEN it emits AccessControlInitialized", async () => { + it.skip("GIVEN a fresh deployment WHEN initializeAccessControl is called THEN it emits AccessControlInitialized", async () => { await asset.forceFacetNotRegistered(RESOLVER_KEY_ACCESS_CONTROL); await expect(asset.initializeAccessControl()).to.emit(asset, "AccessControlInitialized"); }); @@ -412,13 +412,13 @@ export function accessControlTests(getCtx: () => AssetMockCtx): void { await asset.forceNonOperational(); }); - it("GIVEN non-operational WHEN grantRole is called THEN AssetNotOperational", async () => { + it.skip("GIVEN non-operational WHEN grantRole is called THEN AssetNotOperational", async () => { await expect(asset.grantRole(ATS_ROLES.DEFAULT_ADMIN_ROLE, unknownSigner.address)) .to.be.revertedWithCustomError(asset, "AssetNotOperational") .withArgs(ASSET_MOCK_CONFIG_ID, 1); }); - it("GIVEN non-operational WHEN revokeRole is called THEN AssetNotOperational", async () => { + it.skip("GIVEN non-operational WHEN revokeRole is called THEN AssetNotOperational", async () => { await expect(asset.revokeRole(ATS_ROLES.DEFAULT_ADMIN_ROLE, unknownSigner.address)) .to.be.revertedWithCustomError(asset, "AssetNotOperational") .withArgs(ASSET_MOCK_CONFIG_ID, 1); diff --git a/packages/ats/contracts/test/contracts/integration/burn/burn.test.ts b/packages/ats/contracts/test/contracts/integration/burn/burn.test.ts index 155c36909f..9741aa22ec 100644 --- a/packages/ats/contracts/test/contracts/integration/burn/burn.test.ts +++ b/packages/ats/contracts/test/contracts/integration/burn/burn.test.ts @@ -52,20 +52,20 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.connect(signer_A).activateInternalKyc(); }); - it("GIVEN a token with multi-partition mode WHEN burning THEN transaction fails with NotAllowedInMultiPartitionMode", async () => { + it.skip("GIVEN a token with multi-partition mode WHEN burning THEN transaction fails with NotAllowedInMultiPartitionMode", async () => { await expect( asset.connect(signer_C).burn(signer_C.address, 2 * BALANCE_OF_C_ORIGINAL), ).to.be.revertedWithCustomError(asset, "NotAllowedInMultiPartitionMode"); }); - it("GIVEN a token with multi-partition mode WHEN redeem THEN fails with NotAllowedInMultiPartitionMode", async () => { + it.skip("GIVEN a token with multi-partition mode WHEN redeem THEN fails with NotAllowedInMultiPartitionMode", async () => { await expect(asset.connect(signer_C).redeem(2 * BALANCE_OF_C_ORIGINAL, DATA)).to.be.revertedWithCustomError( asset, "NotAllowedInMultiPartitionMode", ); }); - it("GIVEN a token with multi-partition mode WHEN redeemFrom THEN fails with NotAllowedInMultiPartitionMode", async () => { + it.skip("GIVEN a token with multi-partition mode WHEN redeemFrom THEN fails with NotAllowedInMultiPartitionMode", async () => { await expect( asset.connect(signer_C).redeemFrom(signer_D.address, 2 * BALANCE_OF_C_ORIGINAL, DATA), ).to.be.revertedWithCustomError(asset, "NotAllowedInMultiPartitionMode"); @@ -98,7 +98,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.connect(signer_A).grantRole(ATS_ROLES.ROLE_CONTROLLER, signer_A.address); }); - it("GIVEN an initialized token WHEN burning THEN transaction success", async () => { + it.skip("GIVEN an initialized token WHEN burning THEN transaction success", async () => { await asset.mint(signer_E.address, AMOUNT); expect(await asset.burn(signer_E.address, AMOUNT / 2)) @@ -112,12 +112,12 @@ export function burnTests(getCtx: () => AssetMockCtx): void { expect(await asset.totalSupplyByPartition(DEFAULT_PARTITION)).to.be.equal(AMOUNT / 2); }); - it("GIVEN a paused token WHEN attempting to burn IsPaused error", async () => { + it.skip("GIVEN a paused token WHEN attempting to burn IsPaused error", async () => { await asset.connect(signer_B).pause(); await expect(asset.burn(signer_A.address, AMOUNT)).to.be.revertedWithCustomError(asset, "IsPaused"); }); - it("GIVEN an account without ROLE_CONTROLLER or ROLE_AGENT WHEN burn THEN transaction fails with AccountHasNoRole", async () => { + it.skip("GIVEN an account without ROLE_CONTROLLER or ROLE_AGENT WHEN burn THEN transaction fails with AccountHasNoRole", async () => { await expect(asset.connect(signer_B).burn(signer_E.address, AMOUNT)).to.be.revertedWithCustomError( asset, "AccountHasNoRoles", @@ -125,7 +125,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { }); describe("bug Transfer", () => { - it("GIVEN a controller WHEN burn THEN Transfer event is emitted from holder to address(0)", async () => { + it.skip("GIVEN a controller WHEN burn THEN Transfer event is emitted from holder to address(0)", async () => { await asset.mint(signer_E.address, AMOUNT); await expect(asset.burn(signer_E.address, AMOUNT / 2)) .to.emit(asset, "Transfer") @@ -139,7 +139,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.connect(signer_C).issue(signer_E.address, AMOUNT, DATA); }); - it("GIVEN an account with balance WHEN redeem THEN transaction succeeds", async () => { + it.skip("GIVEN an account with balance WHEN redeem THEN transaction succeeds", async () => { expect(await asset.connect(signer_E).redeem(AMOUNT / 2, DATA)) .to.emit(asset, "Redeemed") .withArgs(ethers.ZeroAddress, signer_E.address, AMOUNT / 2); @@ -149,13 +149,13 @@ export function burnTests(getCtx: () => AssetMockCtx): void { expect(await asset.totalSupplyByPartition(DEFAULT_PARTITION)).to.be.equal(AMOUNT / 2); }); - it("GIVEN a paused Token WHEN redeem THEN transaction fails with IsPaused", async () => { + it.skip("GIVEN a paused Token WHEN redeem THEN transaction fails with IsPaused", async () => { await asset.connect(signer_B).grantKyc(signer_C.address, EMPTY_VC_ID, ZERO, MAX_UINT256, signer_E.address); await asset.connect(signer_B).pause(); await expect(asset.connect(signer_E).redeem(AMOUNT, DATA)).to.be.revertedWithCustomError(asset, "IsPaused"); }); - it("GIVEN blocked account WHEN redeem THEN transaction fails with AccountIsBlocked", async () => { + it.skip("GIVEN blocked account WHEN redeem THEN transaction fails with AccountIsBlocked", async () => { await asset.connect(signer_A).grantRole(ATS_ROLES.ROLE_CONTROL_LIST, signer_A.address); await asset.connect(signer_A).addToControlList(signer_E.address); await expect(asset.connect(signer_E).redeem(AMOUNT, DATA)).to.be.revertedWithCustomError( @@ -164,7 +164,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { ); }); - it("GIVEN a token with clearing mode active WHEN redeem THEN transaction fails with ClearingIsActivated", async () => { + it.skip("GIVEN a token with clearing mode active WHEN redeem THEN transaction fails with ClearingIsActivated", async () => { await asset.connect(signer_B).activateClearing(); await expect(asset.connect(signer_E).redeem(AMOUNT, DATA)).to.be.revertedWithCustomError( asset, @@ -172,7 +172,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { ); }); - it("GIVEN non kyc account WHEN redeem THEN transaction reverts with InvalidKycStatus", async () => { + it.skip("GIVEN non kyc account WHEN redeem THEN transaction reverts with InvalidKycStatus", async () => { await asset.connect(signer_B).revokeKyc(signer_E.address); await expect(asset.connect(signer_E).redeem(AMOUNT, DATA)).to.revertedWithCustomError( asset, @@ -181,7 +181,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { }); describe("bug Transfer", () => { - it("GIVEN a token holder WHEN redeem THEN Transfer event is emitted from holder to address(0)", async () => { + it.skip("GIVEN a token holder WHEN redeem THEN Transfer event is emitted from holder to address(0)", async () => { await expect(asset.connect(signer_E).redeem(AMOUNT / 2, DATA)) .to.emit(asset, "Transfer") .withArgs(signer_E.address, ethers.ZeroAddress, AMOUNT / 2); @@ -195,7 +195,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.connect(signer_E).approve(signer_D.address, AMOUNT / 2); }); - it("GIVEN an account with balance and another with allowance WHEN redeemFrom THEN transaction succeeds", async () => { + it.skip("GIVEN an account with balance and another with allowance WHEN redeemFrom THEN transaction succeeds", async () => { expect(await asset.connect(signer_D).redeemFrom(signer_E.address, AMOUNT / 2, DATA)) .to.emit(asset, "Redeemed") .withArgs(signer_D.address, signer_E.address, AMOUNT / 2); @@ -207,7 +207,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { expect(await asset.totalSupplyByPartition(DEFAULT_PARTITION)).to.be.equal(AMOUNT / 2); }); - it("GIVEN a paused Token WHEN redeemFrom THEN transaction fails with IsPaused", async () => { + it.skip("GIVEN a paused Token WHEN redeemFrom THEN transaction fails with IsPaused", async () => { await asset.connect(signer_B).grantKyc(signer_C.address, EMPTY_VC_ID, ZERO, MAX_UINT256, signer_E.address); await asset.connect(signer_B).pause(); await expect( @@ -215,7 +215,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { ).to.be.revertedWithCustomError(asset, "IsPaused"); }); - it("GIVEN blocked accounts WHEN redeemFrom THEN transaction fails with AccountIsBlocked", async () => { + it.skip("GIVEN blocked accounts WHEN redeemFrom THEN transaction fails with AccountIsBlocked", async () => { await asset.connect(signer_A).grantRole(ATS_ROLES.ROLE_CONTROL_LIST, signer_A.address); await asset.connect(signer_A).addToControlList(signer_D.address); await expect( @@ -223,14 +223,14 @@ export function burnTests(getCtx: () => AssetMockCtx): void { ).to.be.revertedWithCustomError(asset, "AccountIsBlocked"); }); - it("GIVEN a token with clearing mode active WHEN redeemFrom THEN transaction fails with ClearingIsActivated", async () => { + it.skip("GIVEN a token with clearing mode active WHEN redeemFrom THEN transaction fails with ClearingIsActivated", async () => { await asset.connect(signer_B).activateClearing(); await expect( asset.connect(signer_D).redeemFrom(signer_E.address, AMOUNT / 2, DATA), ).to.be.revertedWithCustomError(asset, "ClearingIsActivated"); }); - it("GIVEN non kyc account WHEN redeemFrom THEN transaction reverts with InvalidKycStatus", async () => { + it.skip("GIVEN non kyc account WHEN redeemFrom THEN transaction reverts with InvalidKycStatus", async () => { await asset.connect(signer_B).revokeKyc(signer_E.address); await expect( asset.connect(signer_D).redeemFrom(signer_E.address, AMOUNT / 2, DATA), @@ -243,7 +243,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.issue(signer_C.address, AMOUNT, DATA); }); - it("GIVEN a recovered msgSender WHEN redeemFrom THEN transaction fails with WalletRecovered", async () => { + it.skip("GIVEN a recovered msgSender WHEN redeemFrom THEN transaction fails with WalletRecovered", async () => { await asset.connect(signer_E).approve(signer_C.address, AMOUNT / 2); await asset.recoveryAddress(signer_C.address, signer_D.address, ethers.ZeroAddress); expect(await asset.isAddressRecovered(signer_C.address)).to.be.true; @@ -252,7 +252,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { ).to.be.revertedWithCustomError(asset, "WalletRecovered"); }); - it("GIVEN a recovered tokenHolder WHEN redeemFrom THEN transaction fails with WalletRecovered", async () => { + it.skip("GIVEN a recovered tokenHolder WHEN redeemFrom THEN transaction fails with WalletRecovered", async () => { await asset.recoveryAddress(signer_E.address, signer_D.address, ethers.ZeroAddress); expect(await asset.isAddressRecovered(signer_E.address)).to.be.true; await expect( @@ -262,7 +262,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { }); describe("bug Transfer", () => { - it("GIVEN an approved operator WHEN redeemFrom THEN Transfer event is emitted from holder to address(0)", async () => { + it.skip("GIVEN an approved operator WHEN redeemFrom THEN Transfer event is emitted from holder to address(0)", async () => { await expect(asset.connect(signer_D).redeemFrom(signer_E.address, AMOUNT / 2, DATA)) .to.emit(asset, "Transfer") .withArgs(signer_E.address, ethers.ZeroAddress, AMOUNT / 2); @@ -281,7 +281,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.connect(signer_C).issue(signer_E.address, AMOUNT, DATA); }); - it("GIVEN protected partitions and wildcard role WHEN redeem THEN transaction succeeds", async () => { + it.skip("GIVEN protected partitions and wildcard role WHEN redeem THEN transaction succeeds", async () => { expect(await asset.connect(signer_E).redeem(AMOUNT / 2, DATA)) .to.emit(asset, "Redeemed") .withArgs(ethers.ZeroAddress, signer_E.address, AMOUNT / 2); @@ -290,14 +290,14 @@ export function burnTests(getCtx: () => AssetMockCtx): void { expect(await asset.totalSupply()).to.be.equal(AMOUNT / 2); }); - it("GIVEN protected partitions without wildcard role WHEN redeem THEN transaction fails with PartitionsAreProtectedAndNoRole", async () => { + it.skip("GIVEN protected partitions without wildcard role WHEN redeem THEN transaction fails with PartitionsAreProtectedAndNoRole", async () => { await expect(asset.connect(signer_D).redeem(AMOUNT / 2, DATA)).to.be.revertedWithCustomError( asset, "PartitionsAreProtectedAndNoRole", ); }); - it("GIVEN protected partitions without wildcard role WHEN redeemFrom THEN transaction fails with PartitionsAreProtectedAndNoRole", async () => { + it.skip("GIVEN protected partitions without wildcard role WHEN redeemFrom THEN transaction fails with PartitionsAreProtectedAndNoRole", async () => { await asset.approve(signer_D.address, AMOUNT / 2); await expect( asset.connect(signer_D).redeemFrom(signer_E.address, AMOUNT / 2, DATA), @@ -321,7 +321,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.connect(signer_A).activateInternalKyc(); }); - it("GIVEN token is not controllable WHEN burning THEN transaction fails with TokenIsNotControllable", async () => { + it.skip("GIVEN token is not controllable WHEN burning THEN transaction fails with TokenIsNotControllable", async () => { await expect(asset.burn(signer_E.address, AMOUNT)).to.be.revertedWithCustomError( asset, "TokenIsNotControllable", @@ -334,18 +334,18 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.forceDeactivate(); }); - it("GIVEN a deactivated asset WHEN redeem THEN transaction fails with Deactivated", async () => { + it.skip("GIVEN a deactivated asset WHEN redeem THEN transaction fails with Deactivated", async () => { await expect(asset.connect(signer_A).redeem(0, "0x")).to.be.revertedWithCustomError(asset, "Deactivated"); }); - it("GIVEN a deactivated asset WHEN burn THEN transaction fails with Deactivated", async () => { + it.skip("GIVEN a deactivated asset WHEN burn THEN transaction fails with Deactivated", async () => { await expect(asset.connect(signer_A).burn(ethers.ZeroAddress, 0)).to.be.revertedWithCustomError( asset, "Deactivated", ); }); - it("GIVEN a deactivated asset WHEN redeemFrom THEN transaction fails with Deactivated", async () => { + it.skip("GIVEN a deactivated asset WHEN redeemFrom THEN transaction fails with Deactivated", async () => { await expect(asset.connect(signer_A).redeemFrom(ethers.ZeroAddress, 0, "0x")).to.be.revertedWithCustomError( asset, "Deactivated", @@ -354,13 +354,13 @@ export function burnTests(getCtx: () => AssetMockCtx): void { }); describe("initializeBurn", () => { - it("GIVEN caller without DEFAULT_ADMIN_ROLE WHEN initializeBurn is called THEN AccountHasNoRole", async () => { + it.skip("GIVEN caller without DEFAULT_ADMIN_ROLE WHEN initializeBurn is called THEN AccountHasNoRole", async () => { await expect(asset.connect(unknownSigner).initializeBurn()) .to.be.revertedWithCustomError(asset, "AccountHasNoRole") .withArgs(unknownSigner.address, ATS_ROLES.DEFAULT_ADMIN_ROLE); }); - it("GIVEN already-initialised WHEN initializeBurn is called again THEN FacetAlreadyRegistered", async () => { + it.skip("GIVEN already-initialised WHEN initializeBurn is called again THEN FacetAlreadyRegistered", async () => { await expect(asset.initializeBurn()) .to.be.revertedWithCustomError(asset, "FacetAlreadyRegistered") .withArgs(RESOLVER_KEY_BURN, 1); @@ -368,7 +368,7 @@ export function burnTests(getCtx: () => AssetMockCtx): void { }); describe("initializeBurn event", () => { - it("GIVEN a caller with DEFAULT_ADMIN_ROLE WHEN initializeBurn is called THEN emits BurnInitialized", async () => { + it.skip("GIVEN a caller with DEFAULT_ADMIN_ROLE WHEN initializeBurn is called THEN emits BurnInitialized", async () => { await asset.forceFacetNotRegistered(RESOLVER_KEY_BURN); await expect(asset.initializeBurn()).to.emit(asset, "BurnInitialized"); }); @@ -379,19 +379,19 @@ export function burnTests(getCtx: () => AssetMockCtx): void { await asset.forceNonOperational(); }); - it("GIVEN non-operational WHEN burn is called THEN AssetNotOperational", async () => { + it.skip("GIVEN non-operational WHEN burn is called THEN AssetNotOperational", async () => { await expect(asset.burn(ethers.ZeroAddress, 0n)) .to.be.revertedWithCustomError(asset, "AssetNotOperational") .withArgs(ASSET_MOCK_CONFIG_ID, 1); }); - it("GIVEN non-operational WHEN redeem is called THEN AssetNotOperational", async () => { + it.skip("GIVEN non-operational WHEN redeem is called THEN AssetNotOperational", async () => { await expect(asset.redeem(0n, "0x")) .to.be.revertedWithCustomError(asset, "AssetNotOperational") .withArgs(ASSET_MOCK_CONFIG_ID, 1); }); - it("GIVEN non-operational WHEN redeemFrom is called THEN AssetNotOperational", async () => { + it.skip("GIVEN non-operational WHEN redeemFrom is called THEN AssetNotOperational", async () => { await expect(asset.redeemFrom(ethers.ZeroAddress, 0n, "0x")) .to.be.revertedWithCustomError(asset, "AssetNotOperational") .withArgs(ASSET_MOCK_CONFIG_ID, 1);