hashgraph / hedera-block-node

New Block Node services
Apache License 2.0
6 stars 2 forks source link

E2E Tests: Data Persistance #187

Open georgi-l95 opened 1 month ago

georgi-l95 commented 1 month ago

Objective: Ensure that the storage service is working as expected and handling files, per configuration.

Test Case ID Test Name Test Description Expected Outcome Negative Scenario
TC_DP_001 verifyBlockDataSavedInCorrectDirectory Verify that the block data is saved in the correct directory after being processed by the Block Node. Block data is saved in the specified directory (e.g., /data/blocks). Condition: Storage directory path is incorrect or inaccessible.
Expected Outcome: Data is not saved, and server logs an error.
TC_DP_002 verifyBlockDataIntegrity Check that the saved block data matches the stream provided by the simulator, ensuring data integrity. Data is complete and uncorrupted.
- Hashes or checksums match between source and saved data.
- No data loss occurs during processing or saving.

Condition: Partial data is saved due to interruptions.
Expected Outcome: Server handles interruptions gracefully and ensures data consistency or allows for recovery procedures.
TC_DP_003 handleStorageDirectoryUnavailable Verify that the Block Node handles situations where the storage directory is unavailable (e.g., permissions issues, disk unmounted). - Server logs a meaningful error message indicating the storage issue.
- Server does not crash and continues running.
- New data is buffered or retried as per configuration.
- Once the storage directory becomes available, data saving resumes automatically or requires minimal intervention.
Condition: Data loss occurs due to storage unavailability.
Expected Outcome: Implement measures to prevent data loss, such as buffering or queuing data until storage is available.
TC_DP_004 verifySavedBlockDataFormat Check that the saved block data follows the defined format and structure. - Data files are in the correct format and encoding.
- All required fields and metadata are present.
- Data adheres to schema definitions.
TBD

Success Criteria: The gRPC server must be up and running on the expected port, and the process should not exit with any error.

georgi-l95 commented 12 hours ago

TC_DP_001 positive case will be done in https://github.com/hashgraph/hedera-block-node/pull/284