Skip to content

test: cover authenticated PUT /api/config validation - #56

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-fef1
Draft

test: cover authenticated PUT /api/config validation#56
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-fef1

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • Invalid TOML accepted / wiping live config on failed PUT
  • Valid authenticated config save path untested
  • Oversized config bodies not rejected at the HTTP transport boundary (413)

Test files added/updated

  • tests/test_gateway_http.c

Why these tests materially reduce regression risk

PUT /api/config writes operator config to disk; until now only GET/401 were covered. Invalid or oversized writes can brick a deployment or silently leave a truncated config.

Validation

  • make test_gateway_http && ./build/test_gateway_http (all tests passed)

Note: empty-body PUT via libcurl was environment-flaky in this runner; covered oversized (413) + invalid TOML + valid save instead.

Open in Web View Automation 

Assert invalid TOML is rejected without wiping config, valid TOML
saves, and oversized bodies return 413 at the transport boundary.

Co-authored-by: esadrianno <esadrianno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant