Skip to content

Commit fc23f41

Browse files
h4x3rotabclaude
andcommitted
docs: update README with 100% test pass rate and new testing workflow
- Update test coverage to show all 36 tests passing (100% success) - Add documentation for new modular testing scripts - Include local integration testing workflow instructions - Add deployment script documentation - Remove outdated notes about failing tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c1aca26 commit fc23f41

File tree

1 file changed

+43
-7
lines changed

1 file changed

+43
-7
lines changed

kms/auth-eth/README.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,48 @@ forge test --ffi --match-path "test/DstackApp.t.sol" && forge test --ffi --match
5757
Test upgrade functionality and contract migration scenarios using OpenZeppelin Foundry Upgrades plugin:
5858

5959
```bash
60-
# Test comprehensive upgrade scenarios with plugin (may have OpenZeppelin validation issues)
60+
# Test comprehensive upgrade scenarios with plugin
6161
forge test --ffi --match-path "test/UpgradesWithPlugin.t.sol"
6262
```
6363

64-
### Run All Working Tests
64+
### Run All Tests
6565

6666
```bash
67-
# Run all stable tests (27 tests total)
67+
# Run all tests (36 tests total)
68+
forge test --ffi
69+
70+
# Or run specific test suites
6871
forge test --ffi --match-path "test/DstackApp.t.sol" && \
69-
forge test --ffi --match-path "test/DstackKms.t.sol"
72+
forge test --ffi --match-path "test/DstackKms.t.sol" && \
73+
forge test --ffi --match-path "test/UpgradesWithPlugin.t.sol"
74+
```
75+
76+
### Local Integration Testing
77+
78+
The project includes automated scripts for testing against a local Anvil blockchain:
79+
80+
```bash
81+
# Quick test workflow
82+
npm run test:all # Sets up chain, deploys contracts, runs all tests
83+
npm run test:all:foundry # Also includes Foundry tests
84+
85+
# Step-by-step workflow
86+
npm run test:setup # Start Anvil and deploy contracts
87+
npm run test:run # Run tests against deployed contracts
88+
npm run test:cleanup # Stop all test processes
89+
90+
# Available NPM scripts for testing
91+
npm test # Run Jest unit tests
92+
npm run test:foundry # Run Foundry tests with FFI
7093
```
7194

7295
### Test Coverage Summary
7396

7497
-**DstackApp.t.sol**: 11/11 tests PASS - Core app functionality
7598
-**DstackKms.t.sol**: 16/16 tests PASS - Core KMS functionality
76-
-**UpgradesWithPlugin.t.sol**: 7/9 tests PASS (2 failing due to OpenZeppelin validation on expected-revert tests)
99+
-**UpgradesWithPlugin.t.sol**: 9/9 tests PASS - Comprehensive upgrade scenarios
77100

78-
**Total: 34/36 tests PASSING (27 core + 7 upgrade tests)**
101+
**Total: 36/36 tests PASSING (100% success rate)**
79102

80103
## Important Notes
81104

@@ -85,7 +108,20 @@ forge test --ffi --match-path "test/DstackKms.t.sol"
85108

86109
## Contract Deployment
87110

88-
The contracts are designed to be deployed as UUPS proxies using the OpenZeppelin Foundry Upgrades plugin. See the test files for deployment examples.
111+
The contracts are designed to be deployed as UUPS proxies. The project includes deployment scripts:
112+
113+
```bash
114+
# Deploy to local Anvil
115+
forge script script/Deploy.s.sol:DeployScript --broadcast --rpc-url http://localhost:8545
116+
117+
# Deploy to other networks
118+
forge script script/Deploy.s.sol:DeployScript --broadcast --rpc-url <RPC_URL> --private-key <PRIVATE_KEY>
119+
```
120+
121+
Available deployment scripts:
122+
- `DeployScript` - Deploys both DstackKms and DstackApp
123+
- `DeployKmsOnly` - Deploys only DstackKms (requires APP_IMPLEMENTATION env var)
124+
- `DeployAppOnly` - Deploys only DstackApp implementation
89125

90126
## BootAuth Server
91127

0 commit comments

Comments
 (0)