Commit 17b2fe6
committed
fix(abl-token): revive orphaned litesvm test
tests-rs/test.rs was moved out of programs/abl-token/tests/ with a
comment saying it would move back once anchor-lang reached "0.33+ on
solana 3.x" to resolve a litesvm/solana-account-info version
conflict. anchor-lang is already at 1.0.2 (resolves to 1.1.2), but
nobody moved the test back — tests-rs/ isn't referenced by any
Cargo.toml, CI workflow, or script, so this test has been silently
dead (not compiling, not running anywhere) since the anchor upgrade.
Moving it back surfaces the real, current, unrelated blocker: the
test imports spl_token_2022::ID directly, which resolves through
spl-token-2022 9.0.0 -> solana-pubkey 2.4.0, a different Pubkey type
than every other dependency here (anchor-lang, litesvm,
solana-keypair) resolves to (the solana-address 2.7.0 family, via
solana-pubkey 3.x/4.x's `pub use ... as Pubkey` re-export). Anchor's
generated ToAccountMetas struct reports this as "expected Address,
found solana_pubkey::Pubkey" - not a real Address/Pubkey type split,
just two incompatible majors of the same crate colliding.
anchor-spl (already a normal dependency) already made this exact
migration, so swapping to anchor_spl::token_2022::ID fixes it with no
new crate needed. Verified: cargo check --tests is clean, anchor
build produces the .so, and cargo test passes both tests.
Also removes the now-unused `pubkey` macro import and the stale
tests-rs/README.md, which described the already-resolved 0.32.1
conflict.
This restores the test to its historical CI status: it was never
enforced by the Anchor CI workflow even before it broke (that
workflow only runs `anchor test`'s TypeScript suite, not `cargo
test`), so this is a restoration, not new CI coverage.1 parent e2b17c4 commit 17b2fe6
3 files changed
Lines changed: 11 additions & 34 deletions
File tree
- tokens/token-2022/transfer-hook/allow-block-list-token/anchor
- programs/abl-token
- tests
- tests-rs
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 1 | | |
8 | 2 | | |
9 | 3 | | |
10 | 4 | | |
| 5 | + | |
11 | 6 | | |
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
16 | | - | |
| 11 | + | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | | - | |
21 | 15 | | |
22 | 16 | | |
23 | 17 | | |
| |||
Lines changed: 0 additions & 26 deletions
This file was deleted.
0 commit comments