mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-19 06:28:03 +00:00
Remove all remaining pytest markers from OpenTelemetry tests
- Remove @pytest.mark.opentelemetry from IntegrationTest class (line 407) - Remove @pytest.mark.no_opentelemetry from OpenTelemetryDisabledTest class (line 456) - All pytest references have now been completely removed - Tests will now work with Django's test runner in CI
This commit is contained in:
@@ -50,7 +50,10 @@ class OpenTelemetryConfigTest(TestCase):
|
||||
config = OpenTelemetryConfig()
|
||||
# In CI environment, OpenTelemetry might be enabled by CI config
|
||||
# So we test that the config respects the environment variables
|
||||
if "OTEL_ENABLED" in original_env and original_env["OTEL_ENABLED"] == "true":
|
||||
if (
|
||||
"OTEL_ENABLED" in original_env
|
||||
and original_env["OTEL_ENABLED"] == "true"
|
||||
):
|
||||
self.assertTrue(config.enabled)
|
||||
else:
|
||||
self.assertFalse(config.enabled)
|
||||
@@ -327,7 +330,6 @@ class AvatarMetricsTest(TestCase):
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.opentelemetry
|
||||
class TracingDecoratorsTest(TestCase):
|
||||
"""Test tracing decorators."""
|
||||
|
||||
@@ -402,7 +404,6 @@ class TracingDecoratorsTest(TestCase):
|
||||
self.assertEqual(result, "success")
|
||||
|
||||
|
||||
@pytest.mark.opentelemetry
|
||||
class IntegrationTest(TestCase):
|
||||
"""Integration tests for OpenTelemetry."""
|
||||
|
||||
@@ -434,7 +435,10 @@ class IntegrationTest(TestCase):
|
||||
try:
|
||||
# In CI environment, OpenTelemetry might be enabled by CI config
|
||||
# So we test that the function respects the environment variables
|
||||
if "OTEL_ENABLED" in original_env and original_env["OTEL_ENABLED"] == "true":
|
||||
if (
|
||||
"OTEL_ENABLED" in original_env
|
||||
and original_env["OTEL_ENABLED"] == "true"
|
||||
):
|
||||
self.assertTrue(is_enabled())
|
||||
else:
|
||||
self.assertFalse(is_enabled())
|
||||
@@ -448,7 +452,6 @@ class IntegrationTest(TestCase):
|
||||
self.assertTrue(config.enabled)
|
||||
|
||||
|
||||
@pytest.mark.no_opentelemetry
|
||||
class OpenTelemetryDisabledTest(TestCase):
|
||||
"""Test OpenTelemetry behavior when disabled (no-op mode)."""
|
||||
|
||||
@@ -474,7 +477,10 @@ class OpenTelemetryDisabledTest(TestCase):
|
||||
try:
|
||||
# In CI environment, OpenTelemetry might be enabled by CI config
|
||||
# So we test that the function respects the environment variables
|
||||
if "OTEL_ENABLED" in original_env and original_env["OTEL_ENABLED"] == "true":
|
||||
if (
|
||||
"OTEL_ENABLED" in original_env
|
||||
and original_env["OTEL_ENABLED"] == "true"
|
||||
):
|
||||
self.assertTrue(is_enabled())
|
||||
else:
|
||||
self.assertFalse(is_enabled())
|
||||
|
||||
Reference in New Issue
Block a user