Compare commits
9 Commits
23a11ec102
...
project/sh
| Author | SHA1 | Date | |
|---|---|---|---|
| c820b6f990 | |||
| 2164003482 | |||
| 57a370ad69 | |||
| b2b8906478 | |||
| 8a59f601c4 | |||
| dc3e9b3e7a | |||
| 0182d20348 | |||
| adae93aba4 | |||
| 2c4526d0ec |
@@ -7,10 +7,13 @@ jobs:
|
||||
name: Reset docker state
|
||||
steps:
|
||||
- name: Stop all containers
|
||||
if: ${{always()}}
|
||||
run: docker stop $(docker ps -a | cut -d " " -f 1 | tail -n +2)
|
||||
|
||||
- name: Remove all containers
|
||||
if: ${{always()}}
|
||||
run: docker rm $(docker ps -a | cut -d " " -f 1 | tail -n +2)
|
||||
|
||||
- name: Remove extra volumes
|
||||
if: ${{always()}}
|
||||
run: docker volume rm road_vision_postgres_data road_vision_pgadmin-data
|
||||
|
||||
@@ -28,18 +28,27 @@ jobs:
|
||||
- name: Clone 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
|
||||
working-directory: IoT-Systems
|
||||
run: docker build -t local/store/${{gitea.sha}} -f store/Dockerfile-test .
|
||||
|
||||
- name: Run Store tests
|
||||
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
|
||||
if: ${{always()}}
|
||||
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:
|
||||
name: Integration smoke testing
|
||||
runs-on: host-arch-x86_64
|
||||
|
||||
@@ -53,7 +53,7 @@ class Datasource:
|
||||
Logger.debug("CONNECT TO SERVER")
|
||||
async with websockets.connect(uri) as websocket:
|
||||
self.connection_status = "Connected"
|
||||
self.websocket = websocket
|
||||
self.websocket = websocket
|
||||
try:
|
||||
while True:
|
||||
data = await websocket.recv()
|
||||
|
||||
@@ -6,6 +6,7 @@ WORKDIR /app
|
||||
COPY store/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 store/. .
|
||||
# Run the main.py script inside the container when it starts
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
PYTHONPATH=$PWD python3 test/main_test.py
|
||||
PYTHONPATH=$PWD python3 -m pytest test_db.py
|
||||
|
||||
@@ -15,7 +15,7 @@ def test_create_processed_agent_data():
|
||||
"user_id": 123,
|
||||
"data": [
|
||||
{
|
||||
"road_state": "good",
|
||||
"road_state": "normal",
|
||||
"agent_data": {
|
||||
"user_id": 999,
|
||||
"accelerometer": {
|
||||
|
||||
Reference in New Issue
Block a user