Skip to content

Commit

Permalink
test(libdatadog): Add test for phase 1
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteFoy committed Feb 10, 2025
1 parent ca62de8 commit a40b960
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/internal/test_native.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
from ddtrace.internal.native import get_configuration_from_disk


def test_get_configuration_from_disk(tmp_path):
def test_get_configuration_from_disk__host_selector(tmp_path):
# First test -- config matches & should be returned
config_1 = tmp_path / "config_1.yaml"
config_1.write_text(
"""
apm_configuration_default:
DD_RUNTIME_METRICS_ENABLED: true
""",
encoding="utf-8",
)

config = get_configuration_from_disk(file_override=str(config_1))
assert config == {"DD_RUNTIME_METRICS_ENABLED": "true"}


def test_get_configuration_from_disk__service_selector(tmp_path):
# First test -- config matches & should be returned
config_1 = tmp_path / "config_1.yaml"
config_1.write_text(
Expand Down

0 comments on commit a40b960

Please sign in to comment.