Skip to content

SYN-6725: Add Validate support for Synthetics test definitions - #52

Draft
jcsco wants to merge 1 commit into
v2from
SYN-6725-validate-support
Draft

SYN-6725: Add Validate support for Synthetics test definitions#52
jcsco wants to merge 1 commit into
v2from
SYN-6725-validate-support

Conversation

@jcsco

@jcsco jcsco commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ValidateNew*/Validate* client methods to syntheticsclientv2 for API, Browser, HTTP (including nullable-port variants), Port, and SSL v2 test checks, covering both create-style (POST .../validate) and update-style (PUT .../{id}/validate) validation flows against the Synthetics API's test validate endpoints.
  • Validation never creates, updates, deletes, or runs a test — it only checks whether the payload would be accepted.
  • Adds a shared ValidateResponse type with a FieldErrors() helper that normalizes the API's details field, which is an empty array on success and an object of per-attribute error messages on failure.
  • SSL update-style validation takes SslCheckV2UpdateInput (matching UpdateSslCheckV2's partial-update semantics) while SSL create-style validation takes SslCheckV2Input.
  • Documents supported test types/flows and known gaps (no validate support for the deprecated V1 client, and no validate endpoint for Location, Variable, TOTP variable, downtime configuration, CA certificate, or client certificate resources) in the README.

Jira: SYN-6725

Test plan

  • go build ./...
  • go test -tags unit_tests ./... — full suite passes, including new tests covering both success and field-level-error validation responses for every supported type/flow

Adds ValidateNew*/Validate* client methods for API, Browser, HTTP
(including nullable-port variants), Port, and SSL v2 test checks,
covering both create-style and update-style validation against the
Synthetics API's validate endpoints. Validation never saves a test
or triggers a run.

ValidateResponse.FieldErrors() normalizes the API's validate response,
which returns an empty array for details on success and an object of
per-attribute error messages on failure.
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