Skip to content

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

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

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>
@adriannoes

Copy link
Copy Markdown
Collaborator

Superseded by #99.

Invalid TOML 400 and valid authenticated PUT were already on development. The leftover 413 for PUT /api/config body >64 KiB is now covered in #99.

@adriannoes adriannoes closed this Sep 21, 2026
@adriannoes
adriannoes deleted the cursor/test-coverage-automation-fef1 branch September 22, 2026 21:17
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.

2 participants