This document outlines the comprehensive testing strategy for the go-fula library after the EVM blockchain migration from substrate to Base/Skale chains.
- Unit Tests: Test individual functions and methods
- Integration Tests: Test module interactions
- Edge Cases: Test error conditions, timeouts, and boundary conditions
- Production Scenarios: Test real-world usage patterns
-
Chain Configuration
GetChainConfigs()returns correct Base and Skale configurations- Chain selection and fallback mechanisms
- Invalid chain name handling
-
EVM Chain Calls
callEVMChain()with valid/invalid parameterscallEVMChainWithRetry()retry logic and exponential backoff- JSON-RPC request/response handling
- Network timeout and error scenarios
-
Pool Operations (EVM)
PoolJoin()with EVM contract integrationPoolLeave()withremoveMemberPeerIdcontract methodHandleEVMPoolList()pool discoveryHandleIsMemberOfPool()membership verification
-
Account Management
AccountExists(),AccountCreate(),AccountBalance()AccountFund()with proper amount handlingAssetsBalance()for different asset types
- Network connectivity issues
- Invalid contract addresses
- Malformed JSON-RPC responses
- Chain synchronization failures
- Timeout scenarios
-
Configuration
NewClient()with various configurations- Blockchain endpoint validation
- Pool name and chain selection
-
Data Operations
Put()andGet()with different codecsPush()andPull()operationsStore()andLoad()functionality
-
Blockchain Integration
- Mobile blockchain operations (AccountExists, AccountCreate, etc.)
- Pool join/leave from mobile clients
- Error handling for blockchain failures
- Invalid multiaddr formats
- Network disconnections during operations
- Large data transfers
- Concurrent operations
-
Storage Operations
StoreCid()with replication limitsStoreManifest()batch operations- IPFS integration and pinning
-
Exchange Operations
Push()andPull()between peers- Provider discovery via IPNI
- Relay connectivity
-
Blockchain Integration
- Pool member management
- Chain status monitoring
- Account verification
- Storage capacity limits
- Provider unavailability
- Network partitions
- Concurrent storage requests
-
Data Exchange
Push()andPull()operationsPullBlock()single block retrieval- Authorization mechanisms
-
Provider Discovery
- IPNI provider finding
- DHT operations
- Relay usage
- Provider timeouts
- Authorization failures
- Network congestion
- Large file transfers
-
Pool Management
- Join/leave pool endpoints
- Chain status reporting
- Account management
-
WiFi Operations
- Network scanning and connection
- Access point management
- Invalid pool configurations
- Network connectivity issues
- Concurrent requests
- Blockchain EVM integration tests
- Pool join/leave operations
- Basic mobile client operations
- Core blox storage functionality
- Mobile-to-blox communication
- Multi-chain operations
- Provider discovery and exchange
- WAP server endpoints
- Error handling scenarios
- Network failure recovery
- Concurrent operations
- Load testing
- Mock EVM RPC endpoints for Base/Skale
- Mock IPFS nodes
- Mock relay servers
- Mock blockchain contracts
- Valid/invalid peer IDs
- Sample CIDs and IPLD nodes
- Chain configuration variations
- Network addresses and multiaddrs
- All unit tests pass
- Integration tests cover main workflows
- Edge cases are handled gracefully
- No blocking operations cause application failures
- Backward compatibility maintained where applicable