Compare commits

..

7 Commits

Author SHA1 Message Date
hasslesstech ad3c336ecf [P] Send only visible records from store on websocket connection
Component testing / Hub testing (push) Successful in 21s
Component testing / Store testing (push) Successful in 26s
Component testing / Integration smoke testing (push) Successful in 2m36s
2026-03-27 18:38:22 +02:00
hasslesstech 5c3010dcfe [P] Remove user_id from store <-> mapview interaction, fix update_db_record 2026-03-27 18:24:53 +02:00
hasslesstech 712691f3d2 [P] Sync the async function 2026-03-27 18:15:56 +02:00
Rhinemann f5486f0469 [P] Add database update after marker deletion.
Component testing / Hub testing (push) Successful in 23s
Component testing / Store testing (push) Successful in 34s
Component testing / Integration smoke testing (push) Successful in 2m54s
2026-03-27 16:41:39 +01:00
Rhinemann 51fca8436a [P] Code cleanup. 2026-03-27 16:41:39 +01:00
hasslesstech c5f6fbf7af [L4] Fix relative module imports 2026-03-27 16:41:39 +01:00
SimonSanich 7b02884b10 Add test for new records in DB 2026-03-27 16:41:38 +01:00
6 changed files with 4 additions and 17 deletions
-3
View File
@@ -7,13 +7,10 @@ jobs:
name: Reset docker state name: Reset docker state
steps: steps:
- name: Stop all containers - name: Stop all containers
if: ${{always()}}
run: docker stop $(docker ps -a | cut -d " " -f 1 | tail -n +2) run: docker stop $(docker ps -a | cut -d " " -f 1 | tail -n +2)
- name: Remove all containers - name: Remove all containers
if: ${{always()}}
run: docker rm $(docker ps -a | cut -d " " -f 1 | tail -n +2) run: docker rm $(docker ps -a | cut -d " " -f 1 | tail -n +2)
- name: Remove extra volumes - name: Remove extra volumes
if: ${{always()}}
run: docker volume rm road_vision_postgres_data road_vision_pgadmin-data run: docker volume rm road_vision_postgres_data road_vision_pgadmin-data
+1 -10
View File
@@ -28,27 +28,18 @@ jobs:
- name: Clone repository - name: Clone repository
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }} run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
- name: Start postgres_db container for testing
working-directory: IoT-Systems
run: docker-compose up -d postgres_db
- name: Build Store testing container - name: Build Store testing container
working-directory: IoT-Systems working-directory: IoT-Systems
run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test . run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test .
- name: Run Store tests - name: Run Store tests
working-directory: IoT-Systems working-directory: IoT-Systems
run: docker run --network host --rm -it local/store/${{gitea.sha}} run: docker run --rm -it local/store/${{gitea.sha}}
- name: Clean up containers - name: Clean up containers
if: ${{always()}} if: ${{always()}}
run: docker image rm local/store/${{gitea.sha}} run: docker image rm local/store/${{gitea.sha}}
- name: Clean up docker-compose
if: ${{always()}}
working-directory: IoT-Systems
run: docker-compose down -v --remove-orphans
integration-smoke-test: integration-smoke-test:
name: Integration smoke testing name: Integration smoke testing
runs-on: host-arch-x86_64 runs-on: host-arch-x86_64
+2 -1
View File
@@ -4,6 +4,7 @@ from datetime import datetime
import websockets import websockets
from kivy import Logger from kivy import Logger
from pydantic import BaseModel, field_validator from pydantic import BaseModel, field_validator
from config import STORE_HOST, STORE_PORT from config import STORE_HOST, STORE_PORT
@@ -53,7 +54,7 @@ class Datasource:
Logger.debug("CONNECT TO SERVER") Logger.debug("CONNECT TO SERVER")
async with websockets.connect(uri) as websocket: async with websockets.connect(uri) as websocket:
self.connection_status = "Connected" self.connection_status = "Connected"
self.websocket = websocket self.websocket = websocket
try: try:
while True: while True:
data = await websocket.recv() data = await websocket.recv()
-1
View File
@@ -6,7 +6,6 @@ WORKDIR /app
COPY store/requirements.txt . COPY store/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --root-user-action ignore --no-cache-dir pytest httpx
# Copy the entire application into the container # Copy the entire application into the container
COPY store/. . COPY store/. .
# Run the main.py script inside the container when it starts # Run the main.py script inside the container when it starts
-1
View File
@@ -1,4 +1,3 @@
#!/bin/sh #!/bin/sh
PYTHONPATH=$PWD python3 test/main_test.py PYTHONPATH=$PWD python3 test/main_test.py
PYTHONPATH=$PWD python3 -m pytest test_db.py
+1 -1
View File
@@ -15,7 +15,7 @@ def test_create_processed_agent_data():
"user_id": 123, "user_id": 123,
"data": [ "data": [
{ {
"road_state": "normal", "road_state": "good",
"agent_data": { "agent_data": {
"user_id": 999, "user_id": 999,
"accelerometer": { "accelerometer": {