Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest tests #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.venv/
/__pycache__/
/*/__pycache__/
/replay/config.json
/replay/data/
Empty file added tests/__init__.py
Empty file.
23 changes: 23 additions & 0 deletions tests/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"docker_timeout_sec": 10,
"network": "host",

"replay_image": "ghcr.io/insight-platform/replay-x86:main",
"replay_log_level": "info",
"replay_in_stream_url": "router+bind:tcp://0.0.0.0:5555",
"replay_api_host": "http://127.0.0.1:8080/api/v1/",

"savant_adapters_gstreamer_image": "ghcr.io/insight-platform/savant-adapters-gstreamer:latest",
"adapter_log_level": "info",
"adapter_zmq_endpoint": "dealer+connect:tcp://127.0.0.1:5555",

"video_loop_test_file": "test_data/test_video.avi",
"video_loop_download_path": "video_loop/source_downloads",

"video_file_test_file": "test_data/test_video.avi",
"video_file_test_dir": "test_data/video_directory",

"job_sink_url": "dealer+connect:tcp://127.0.0.1:6666",
"sink_socket": "router+bind:tcp://0.0.0.0:6666",
"sink_idle_timeout_sec": 30
}
33 changes: 33 additions & 0 deletions tests/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from dataclasses import dataclass
from enum import Enum


class LogLevel(Enum):
info = 'info'
debug = 'debug'


@dataclass
class Configuration:
docker_timeout_sec: int
network: str

replay_image: str
replay_log_level: LogLevel
replay_in_stream_url: str
replay_api_host: str

savant_adapters_gstreamer_image: str
adapter_log_level: LogLevel
adapter_zmq_endpoint: str

video_loop_test_file: str
video_loop_download_path: str

video_file_test_file: str
video_file_test_dir: str

job_sink_url: str

sink_socket: str
sink_idle_timeout_sec: int
Loading
Loading