Skip to content

Commit

Permalink
Add GET support for /v0.7/config (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Verhoog authored Oct 23, 2023
1 parent c72b457 commit d112da6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions ddapm_test_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ def make_app(
web.post("/v0.6/stats", agent.handle_v06_tracestats),
web.post("/v0.1/pipeline_stats", agent.handle_v01_pipelinestats),
web.put("/v0.6/stats", agent.handle_v06_tracestats),
web.get("/v0.7/config", agent.handle_v07_remoteconfig),
web.post("/v0.7/config", agent.handle_v07_remoteconfig),
web.post("/telemetry/proxy/api/v2/apmtelemetry", agent.handle_v2_apmtelemetry),
web.post("/profiling/v1/input", agent.handle_v1_profiling),
Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/rc-get-endpoint-e502f55b7df544e2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Add GET method support for the ``/v0.7/config`` endpoint. The Go library
uses ``GET`` requests and the Datadog Agent supports multiple HTTP methods.
9 changes: 6 additions & 3 deletions tests/test_remoteconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ async def _request_update_and_get_data_with_session(rc_agent, token, data, expec
assert json.loads(content) == expected


async def test_remoteconfig(
rc_agent,
):
async def test_remoteconfig(rc_agent):
resp = await rc_agent.post("/v0.7/config")
content = await resp.text()
assert resp.status == 200
assert content == "{}"

resp = await rc_agent.get("/v0.7/config")
content = await resp.text()
assert resp.status == 200
assert content == "{}"


async def test_remoteconfig_create_payload(
rc_agent,
Expand Down

0 comments on commit d112da6

Please sign in to comment.