mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-13 03:08:49 +00:00
Manual Testing Scripts
This directory contains manual test scripts for testing the dynamic database clustering feature through the Gateway API.
Prerequisites
-
Start the Gateway:
cd /Users/penguin/dev/debros/network make run-gateway -
Start at least 3 nodes (in separate terminals):
# Terminal 1 make run-node # Terminal 2 make run-node2 # Terminal 3 make run-node3 -
Set your API key: The scripts use the API key:
ak_L1zF6g7Np1dSRyy-zp_cXFfA:default
Test Scripts
Basic Tests
01_create_table.sh- Create a table in a database02_insert_data.sh- Insert data into a table03_query_data.sh- Query data from a table04_execute_sql.sh- Execute arbitrary SQL05_transaction.sh- Execute a transaction06_get_schema.sh- Get database schema
Advanced Tests
07_multiple_databases.sh- Test multiple isolated databases08_hibernation_test.sh- Test hibernation and wake-up09_stress_test.sh- Create many databases
Utility Scripts
cleanup.sh- Clean up test databasesrun_all_tests.sh- Run all tests in sequence
Usage
Make scripts executable:
chmod +x mantests/*.sh
Run individual test:
./mantests/01_create_table.sh
Run all tests:
./mantests/run_all_tests.sh
Expected Results
All scripts should return HTTP 200 status codes and appropriate JSON responses. Check the output for:
- Success messages
- Returned data matching expectations
- No errors in the JSON responses
Troubleshooting
If tests fail:
- Ensure gateway is running on
http://localhost:8080 - Ensure at least 3 nodes are running
- Check that nodes have discovered each other (wait 10 seconds after startup)
- Verify API key is valid
- Check gateway and node logs for errors