[P] Integrate MapView testing into CI pipeline
Some checks failed
Component testing / Hub testing (push) Successful in 19s
Component testing / Store testing (push) Successful in 39s
Component testing / MapView testing (push) Failing after 1m41s
Component testing / Integration smoke testing (push) Has been skipped

This commit is contained in:
2026-03-31 11:36:28 +03:00
parent 0f053f5c8f
commit a672f48f7c
4 changed files with 41 additions and 3 deletions

15
MapView/Dockerfile-test Normal file
View File

@@ -0,0 +1,15 @@
# Use the official Python image as the base image
FROM python:latest
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements.txt file and install dependencies
COPY MapView/requirements.txt .
RUN sed -i 's/==.*//' requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --root-user-action ignore --no-cache-dir unittest
# Copy the entire application into the container
COPY MapView/. .
# Run the main.py script inside the container when it starts
#CMD ["uvicorn", "main:app", "--host", "0.0.0.0"]
CMD ["./test-entry.sh"]

3
MapView/test-entry.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
PYTHONPATH=$PWD python3 -m unittest tests.test_mp

View File

@@ -6,8 +6,8 @@ sys.modules['lineMapLayer'] = Mock()
sys.modules['datasource'] = Mock()
sys.modules['config'] = Mock()
from MapView.main import get_lat_lon, MapViewApp
from MapView.datasource import Datasource as DataSourceClass
from main import get_lat_lon, MapViewApp
from datasource import Datasource as DataSourceClass
# -----------------------
@@ -89,4 +89,4 @@ class TestMapLatLonToProcessedAgentData(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
unittest.main()