Commit 93efd8e2 authored by Anastasios Pandis's avatar Anastasios Pandis
Browse files

added integration test marker and updated the test instructions

parent c1539b60
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -62,5 +62,10 @@ package-dir = {"" = "src"}
where = ["src"]
include = ["sunrise6g_opensdk*"]

[tool.pytest.ini_options]
markers = [
  "integration: tests that require a live NEF stack (deselected by default)",
]

[tool.setuptools.package-data]
sunrise6g_opensdk = ["py.typed"]
+8 −1
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@

##

import os

import pytest

from sunrise6g_opensdk.common.sdk import Sdk as sdkclient
@@ -373,7 +375,7 @@ class TestParseLocationResponseRealCoordinates:
#   - UE Identity Service reachable (provide its URL)
#
# Run with:
#   pytest tests/network/test_location_retrieval.py -k Integration -v -s
#   RUN_INTEGRATION_TESTS=1 pytest tests/network/aoi_location_retrieval_test.py -m integration -v -s
# ============================================================

client_specs_integ = {
@@ -387,6 +389,11 @@ clients_integ = sdkclient.create_adapters_from(client_specs_integ)
network_client_integ: BaseNetworkClient = clients_integ.get("network")


@pytest.mark.integration
@pytest.mark.skipif(
    os.getenv("RUN_INTEGRATION_TESTS") != "1",
    reason="Set RUN_INTEGRATION_TESTS=1 to run integration tests against a live NEF",
)
class TestOaiNefIntegration:
    """
    Integration tests against a running OAI NEF at localhost:80.