Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ab2b4e46b |
@@ -1,16 +0,0 @@
|
||||
name: Reset docker state
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
reset:
|
||||
runs-on: host-arch-x86_64
|
||||
name: Reset docker state
|
||||
steps:
|
||||
- name: Stop all containers
|
||||
run: docker stop $(docker ps -a | cut -d " " -f 1 | tail -n +2)
|
||||
|
||||
- name: Remove all containers
|
||||
run: docker rm $(docker ps -a | cut -d " " -f 1 | tail -n +2)
|
||||
|
||||
- name: Remove extra volumes
|
||||
run: docker volume rm road_vision_postgres_data road_vision_pgadmin-data
|
||||
@@ -30,20 +30,20 @@ jobs:
|
||||
|
||||
- name: Build Store testing container
|
||||
working-directory: IoT-Systems
|
||||
run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test .
|
||||
run: docker build -t local/hub/${{gitea.sha}} -f hub/Dockerfile-test .
|
||||
|
||||
- name: Run Store tests
|
||||
working-directory: IoT-Systems
|
||||
run: docker run --rm -it local/store/${{gitea.sha}}
|
||||
run: docker run --rm -it local/hub/${{gitea.sha}}
|
||||
|
||||
- name: Clean up containers
|
||||
if: ${{always()}}
|
||||
run: docker image rm local/store/${{gitea.sha}}
|
||||
run: docker image rm local/hub/${{gitea.sha}}
|
||||
|
||||
integration-smoke-test:
|
||||
name: Integration smoke testing
|
||||
runs-on: host-arch-x86_64
|
||||
needs:
|
||||
depends:
|
||||
- hub-test
|
||||
- store-test
|
||||
steps:
|
||||
@@ -67,5 +67,4 @@ jobs:
|
||||
|
||||
- name: Clean up
|
||||
if: ${{always()}}
|
||||
working-directory: IoT-Systems
|
||||
run: docker-compose down -v
|
||||
run: docker image rm local/hub/${{gitea.sha}}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
PYTHONPATH=$PWD python3 test/main_test.py
|
||||
python3 test/main_test.py
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
from schemas import AccelerometerData, AgentData, GpsData, ProcessedAgentData
|
||||
|
||||
import main
|
||||
import ..main
|
||||
|
||||
def _test_ProcessedAgentData_to_td():
|
||||
processed_data_batch = [
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import sys
|
||||
|
||||
print("Checking for dead containers...")
|
||||
|
||||
l = [i for i in sys.stdin.read().split("\n") if i]
|
||||
header, statuses = l[0], l[1:]
|
||||
|
||||
status_index = header.find('STATUS')
|
||||
name_index = header.find('NAMES')
|
||||
|
||||
exit_code = 0
|
||||
|
||||
for i in statuses:
|
||||
if not i[status_index:].startswith("Up "):
|
||||
service_name = i[name_index:]
|
||||
print(f"Crash detected in {service_name}")
|
||||
exit_code = 1
|
||||
|
||||
sys.exit(exit_code)
|
||||
Reference in New Issue
Block a user