You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(e2e): hoist duplicated poll/expect_revert helpers into decdn-e2e, make ensure_mined pub #1370
good first issueScoped and documented well enough for a first contributionkind:testTest coverage, flakes, fixtures or the e2e harnessprio:lowWhen convenientrustDependabot: a Cargo update; use area: labels for Rust code otherwise
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.
good first issueScoped and documented well enough for a first contributionkind:testTest coverage, flakes, fixtures or the e2e harnessprio:lowWhen convenientrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity