Add temporary functiontal tests, that must be removed soon. Refactor tests: Remove outdated resource manager tests and add functional tests with Docker and Kafka integration - Deleted existing unit tests for ResourceManager. - Introduced new functional tests for single node operations with Redis and Kafka. - Added Docker Compose setup for test environment. - Implemented fixtures for Redis and Kafka consumers. - Created comprehensive tests for data publishing and slot management. - Added unit tests for DataManager and IngestorManager with mocked dependencies. - Included tests for OpcManager covering connection, subscription, and data change notifications.
30 lines
777 B
Docker
30 lines
777 B
Docker
# syntax=docker/dockerfile:1.4
|
|
|
|
from python:3.11-slim
|
|
|
|
RUN apt-get update && apt-get install -y git openssh-client && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the working directory
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file into the container
|
|
COPY requirements.txt .
|
|
COPY __init__.py .
|
|
|
|
# Copy code into the container
|
|
COPY ./ingestor ./ingestor
|
|
|
|
# Install the required packages
|
|
# Add github to known hosts
|
|
# This is needed for SSH to work
|
|
# The SSH key will NOT remain in the image
|
|
# IMPORTANT: this block requires BuildKit
|
|
# and the --ssh flag during docker build
|
|
RUN --mount=type=ssh \
|
|
mkdir -p ~/.ssh && \
|
|
ssh-keyscan github.com >> ~/.ssh/known_hosts && \
|
|
pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
# Run the application
|
|
CMD ["python", "-m", "ingestor.ingestor"] |