Compare commits

..

9 Commits

Author SHA1 Message Date
c820b6f990 [P] Always execute all steps while cleaning up
All checks were successful
Component testing / Hub testing (push) Successful in 17s
Component testing / Store testing (push) Successful in 41s
Component testing / Integration smoke testing (push) Successful in 2m22s
2026-03-29 13:59:08 +03:00
2164003482 [P] Integrate additional store testing into CI pipeline
Some checks failed
Component testing / Hub testing (push) Successful in 25s
Component testing / Store testing (push) Successful in 45s
Component testing / Integration smoke testing (push) Failing after 11m40s
2026-03-27 20:19:34 +02:00
57a370ad69 [P] Remove trailing spaces
Some checks failed
Component testing / Hub testing (push) Successful in 22s
Component testing / Store testing (push) Successful in 24s
Component testing / Integration smoke testing (push) Has been cancelled
2026-03-27 19:51:27 +02:00
b2b8906478 [P] Remove uncessecary empty line 2026-03-27 19:49:18 +02:00
8a59f601c4 [P] Send only visible records from store on websocket connection 2026-03-27 19:49:18 +02:00
dc3e9b3e7a [P] Remove user_id from store <-> mapview interaction, fix update_db_record 2026-03-27 19:49:18 +02:00
0182d20348 [P] Sync the async function 2026-03-27 19:49:18 +02:00
adae93aba4 [P] Add database update after marker deletion. 2026-03-27 19:49:18 +02:00
2c4526d0ec [P] Code cleanup. 2026-03-27 19:49:18 +02:00
6 changed files with 17 additions and 3 deletions

View File

@@ -7,10 +7,13 @@ 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

View File

@@ -28,18 +28,27 @@ 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 --rm -it local/store/${{gitea.sha}} run: docker run --network host --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

View File

@@ -53,7 +53,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()

View File

@@ -6,6 +6,7 @@ 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

View File

@@ -1,3 +1,4 @@
#!/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

View File

@@ -15,7 +15,7 @@ def test_create_processed_agent_data():
"user_id": 123, "user_id": 123,
"data": [ "data": [
{ {
"road_state": "good", "road_state": "normal",
"agent_data": { "agent_data": {
"user_id": 999, "user_id": 999,
"accelerometer": { "accelerometer": {