@@ -942,8 +942,12 @@ for better compatibility with modern compose.yaml files.
942
942
### 4.1 Test VM Access
943
943
944
944
``` bash
945
- # [PROJECT_ROOT] Test basic VM connectivity
946
- time ./infrastructure/tests/test-integration.sh access
945
+ # [PROJECT_ROOT] Test basic VM connectivity using SSH
946
+ make ssh
947
+
948
+ # Or test connectivity manually
949
+ VM_IP=$( cd infrastructure/terraform && tofu output -raw vm_ip)
950
+ ssh torrust@$VM_IP " echo 'VM is accessible'"
947
951
```
948
952
949
953
** Expected Output** :
@@ -955,8 +959,14 @@ time ./infrastructure/tests/test-integration.sh access
955
959
### 4.2 Test Docker Installation
956
960
957
961
``` bash
958
- # [PROJECT_ROOT] Test Docker functionality
959
- time ./infrastructure/tests/test-integration.sh docker
962
+ # [PROJECT_ROOT] Test Docker functionality via health check
963
+ make health-check
964
+
965
+ # Or test Docker manually via SSH
966
+ make ssh
967
+ # Then inside VM:
968
+ docker --version
969
+ docker compose version
960
970
```
961
971
962
972
** Expected Output** :
@@ -973,8 +983,8 @@ available and uses the appropriate command.
973
983
### 4.3 Setup Torrust Tracker Demo
974
984
975
985
``` bash
976
- # [PROJECT_ROOT] Clone and setup the Torrust Tracker repository
977
- time ./infrastructure/tests/test-integration.sh setup
986
+ # [PROJECT_ROOT] Deploy the application using twelve-factor workflow
987
+ make app-deploy
978
988
```
979
989
980
990
** Expected Output** :
@@ -989,8 +999,10 @@ configuration.
989
999
### 4.4 Start Torrust Tracker Services
990
1000
991
1001
``` bash
992
- # [PROJECT_ROOT] Pull images and start all services
993
- time ./infrastructure/tests/test-integration.sh start
1002
+ # [PROJECT_ROOT] Application deployment includes starting services
1003
+ # Services are automatically started by 'make app-deploy'
1004
+ # To verify services are running:
1005
+ make health-check
994
1006
```
995
1007
996
1008
** Expected Output** :
@@ -1010,8 +1022,8 @@ time ./infrastructure/tests/test-integration.sh start
1010
1022
### 4.5 Test Service Endpoints
1011
1023
1012
1024
``` bash
1013
- # [PROJECT_ROOT] Test all API endpoints
1014
- time ./infrastructure/tests/test-integration.sh endpoints
1025
+ # [PROJECT_ROOT] Test all endpoints via comprehensive health check
1026
+ make health-check
1015
1027
```
1016
1028
1017
1029
** Expected Output** :
@@ -1028,8 +1040,11 @@ requirements. For manual testing, see Step 5.2 for the correct endpoint testing
1028
1040
### 4.6 Test Monitoring Services
1029
1041
1030
1042
``` bash
1031
- # [PROJECT_ROOT] Test Prometheus and Grafana
1032
- time ./infrastructure/tests/test-integration.sh monitoring
1043
+ # [PROJECT_ROOT] Test Prometheus and Grafana via health check
1044
+ make health-check
1045
+
1046
+ # For detailed monitoring, connect via SSH to inspect services directly
1047
+ make ssh
1033
1048
```
1034
1049
1035
1050
** Expected Output** :
@@ -1041,8 +1056,8 @@ time ./infrastructure/tests/test-integration.sh monitoring
1041
1056
### 4.7 Run Complete Integration Test Suite
1042
1057
1043
1058
``` bash
1044
- # [PROJECT_ROOT] Run all tests in sequence
1045
- time ./infrastructure/tests/test-integration.sh full- test
1059
+ # [PROJECT_ROOT] Run complete E2E test (infrastructure + application + health)
1060
+ make test
1046
1061
```
1047
1062
1048
1063
** Expected Output** :
@@ -1541,8 +1556,11 @@ time (cd "$TRACKER_DIR" && cargo run -p torrust-tracker-client --bin http_tracke
1541
1556
### 8.1 Stop Services (if needed)
1542
1557
1543
1558
``` bash
1544
- # [PROJECT_ROOT] Stop all services cleanly
1545
- ./infrastructure/tests/test-integration.sh stop
1559
+ # [PROJECT_ROOT] Stop services via SSH if needed
1560
+ make ssh
1561
+ # Then inside VM:
1562
+ cd /home/torrust/github/torrust/torrust-tracker-demo/application
1563
+ docker compose down
1546
1564
```
1547
1565
1548
1566
### 8.2 Destroy VM and Clean Up
@@ -1669,17 +1687,17 @@ curl http://$VM_IP/api/v1/stats
1669
1687
curl " http://$VM_IP /api/v1/stats?token=local-dev-admin-token-12345"
1670
1688
```
1671
1689
1672
- ### 9.4 Integration Test Script Limitations
1690
+ ### 9.4 Health Check Limitations
1673
1691
1674
- The automated integration test script (` ./infrastructure/tests/test-integration.sh endpoints ` )
1675
- may fail because :
1692
+ The automated health check script (` make health-check ` ) provides comprehensive
1693
+ validation but may need tuning for specific scenarios :
1676
1694
1677
- 1 . ** Authentication ** : Script doesn't include token for stats API
1678
- 2 . ** Port Assumptions ** : May test internal ports instead of nginx proxy
1679
- 3 . ** JSON Parsing ** : Doesn't use ` jq ` for response validation
1695
+ 1 . ** Timeouts ** : Some tests use conservative timeouts that may be slow
1696
+ 2 . ** Test Coverage ** : Focuses on connectivity rather than functional testing
1697
+ 3 . ** Verbose Output ** : Use ` VERBOSE=true make health-check ` for detailed results
1680
1698
1681
- ** Manual testing** (as shown in this guide) provides more reliable results and
1682
- better insight into the actual API functionality .
1699
+ ** Manual testing** (as shown in this guide) provides more detailed functional
1700
+ validation and better insight into the actual API behavior .
1683
1701
1684
1702
### 9.5 Useful Testing Commands
1685
1703
@@ -1798,7 +1816,7 @@ ls -la | grep -E "(Makefile|infrastructure|application)"
1798
1816
1799
1817
- ` make: *** No rule to make target 'configure-local'. Stop. `
1800
1818
- ` make: *** No such file or directory. Stop. `
1801
- - ` ./infrastructure/tests/test-integration.sh: No such file or directory `
1819
+ - Commands like ` make infra-apply ` failing with file not found errors
1802
1820
1803
1821
** Solution** : Always ensure you're in the project root directory before running commands.
1804
1822
0 commit comments