Skip to content

Commit 26d9e30

Browse files
test: remove tests fixtures from remote (#295)
* test: remove tests fixtures from remote chore: add "_setup-fixtures" internal just command chore: git ignore tests/fixtures/ path * chore: undo test lite removal
1 parent 7bbf741 commit 26d9e30

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
docker-target
44
target
55
test-ledger
6+
tests/fixtures/
67
**/*.rs.bk
78

89
# Node.js

justfile

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,19 @@ alias rw := rust-write
109109
# Run all tests
110110
# To debug the Solana logs, run this as `RUST_LOG=debug just test`
111111
[group("test")]
112-
test *args: build
112+
test *args: build _setup-fixtures
113113
na vitest run --hideSkippedTests {{ args }}
114114
alias t := test
115115

116116
# Run all tests without building
117117
[group("test")]
118-
test-lite *args:
118+
test-lite *args: _setup-fixtures
119119
na vitest run --hideSkippedTests {{ args }}
120120
alias tl := test-lite
121121

122122
# Run tests with UI
123123
[group("test")]
124-
test-ui *args: build
124+
test-ui *args: build _setup-fixtures
125125
na vitest --hideSkippedTests --ui {{ args }}
126126
alias tui := test-ui
127127

@@ -136,3 +136,21 @@ alias tlk := test-lockup
136136
test-merkle-instant *args="tests/merkle-instant":
137137
just test {{ args }}
138138
alias tmi := test-merkle-instant
139+
140+
# Download external program fixtures for testing
141+
_setup-fixtures:
142+
#!/usr/bin/env sh
143+
FIXTURES_DIR="tests/fixtures"
144+
145+
if [ ! -d "$FIXTURES_DIR" ]; then
146+
echo "📦 Setting up fixtures..."
147+
mkdir -p "$FIXTURES_DIR"
148+
149+
# Token Metadata Program
150+
echo "📥 Downloading Token Metadata program..."
151+
solana program dump -u m metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s "$FIXTURES_DIR/token_metadata_program.so"
152+
153+
# Chainlink Program
154+
echo "📥 Downloading Chainlink program..."
155+
solana program dump -u m HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny "$FIXTURES_DIR/chainlink_program.so"
156+
fi
-1.43 MB
Binary file not shown.
-775 KB
Binary file not shown.

0 commit comments

Comments
 (0)