Skip to content

Commit

Permalink
enhancement #46: test receiving list of producers
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienDanieau committed Aug 7, 2024
1 parent dc4445c commit c1d351e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
- name : Install Rust
uses: hecrj/setup-rust-action@v2

- name: Clone gst-plugins-rs
- name: Install Gst Signalling Server
run: |
git clone -b 0.12.8 --depth 1 https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
cd gst-plugins-rs/net/webrtc/signalling/
cargo build
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand All @@ -29,4 +31,4 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install .[dev]
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ dev = black==23.10.1
mypy==1.6.1
isort==5.12.0
pygobject-stubs==2.10.0
pytest==7.4.3
coverage==7.3.2

[options.entry_points]
console_scripts =
Expand Down
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


@pytest.fixture
def signalling_host() -> str:
return "127.0.0.1"


@pytest.fixture
def signalling_port() -> int:
return 8443
9 changes: 9 additions & 0 deletions tests/test_list_producers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pytest

from gst_signalling import utils


def test_empty_list(signalling_host: str, signalling_port: int) -> None:
producers = utils.get_producer_list(signalling_host, signalling_port)

assert len(producers) == 0

0 comments on commit c1d351e

Please sign in to comment.