Skip to content

Commit 4587573

Browse files
committed
docs: add TEST_ISSUES.md for tracking test failures
1 parent 702abc7 commit 4587573

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

tests-e2e/TEST_ISSUES.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# E2E Test Issues
2+
3+
## Issue #1: `failures.rs` Scenario 3 - Spender Privilege Escalation Test
4+
5+
**Status**: 🔴 Broken
6+
**Priority**: Medium
7+
**File**: `tests-e2e/src/scenarios/failures.rs` (lines 225-290)
8+
9+
### Problem
10+
Test has incorrect logic - mixes CreateSession and AddAuthority concepts:
11+
- Creates `session_pda` and `session_auth_pda` with session keypair seeds
12+
- But uses AddAuthority instruction discriminator `[1, 3]`
13+
- Account list doesn't match either CreateSession or AddAuthority expected format
14+
- Error: `InvalidInstructionData` (consumed only 113 compute units)
15+
16+
### Root Cause
17+
Test was likely written during refactoring and instruction formats changed. The test:
18+
1. Sets up PDAs for session creation
19+
2. But instruction data is for AddAuthority (discriminator 1)
20+
3. Account order is wrong for both instructions
21+
22+
### Fix Required
23+
Decide what this test should actually verify:
24+
- **Option A**: Test that spender cannot call AddAuthority → fix instruction data and accounts
25+
- **Option B**: Test that expired session cannot be used → rewrite as proper CreateSession + Execute flow
26+
27+
### Affected Code
28+
```rust
29+
// Line 268-272 - Instruction data is mixed up
30+
data: [
31+
vec![1, 3], // AddAuthority(Session) ← WRONG
32+
(now - 100).to_le_bytes().to_vec(), // Expires in past
33+
]
34+
.concat(),
35+
```
36+
37+
---
38+
39+
## Issue #2: Other Skipped Tests Not Running
40+
41+
Tests after scenario 3 failure are skipped:
42+
- Cross Wallet Attacks
43+
- DoS Attack
44+
- Audit Validations
45+
46+
These should run after fixing Issue #1.

0 commit comments

Comments
 (0)