Skip to content

test(e2e): hoist duplicated poll/expect_revert helpers into decdn-e2e, make ensure_mined pub #1370

Closed

Description

@yigitdot

The e2e integration tests re-implement the same helpers because integration test targets are separate crates and cannot reach pub(crate) items in crates/e2e/src/.

Current duplication:

  • async fn poll<T, F, Fut> — 4 byte-identical copies: g_gov_02_rate_bounds.rs, g_node_04_blacklist_compliance.rs, smoke.rs, slash_appeal.rs. The copies have already drifted in their doc comments.
  • fn expect_revert<T, E: SolError> — 2 copies: g_gov_02_rate_bounds.rs, g_origin_01_publish.rs. The former's doc comment openly admits it mirrors the latter.
  • fn mined(status: bool, what: &str) in g_gov_02_rate_bounds.rs re-implements decdn_e2e::ensure_mined (crates/e2e/src/lib.rs:76), which is pub(crate) and therefore unreachable from an integration test. The local copy also takes a bare bool rather than the receipt, so it loses the tx hash from its failure message and an inverted argument would be a type-checked no-op.

Suggested:

  • move poll into crates/e2e/src/ (new poll.rs or alongside existing helpers)
  • move expect_revert into crates/e2e/src/assert.rs, which already exists for test-facing assertions
  • promote ensure_mined to pub so tests stop re-implementing it with a weaker signature

The crate is publish = false, so widening this surface costs nothing externally.

Out of scope for #1365 (which touched only g_gov_02_rate_bounds.rs); filed rather than bundled. Found during review of that PR.

Activity

  1. added
    kind:test
    rust
    good first issue
    prio:low
    on Jul 22, 2026
  2. self-assigned this
    on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issuekind:testprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions