Skip to content

SYN-6813: add GetChromeFlags() to fetch chrome_flags endpoint - #54

Merged
jcsco merged 3 commits into
v2from
syn-6813-get-chrome-flags
Aug 12, 2026
Merged

SYN-6813: add GetChromeFlags() to fetch chrome_flags endpoint#54
jcsco merged 3 commits into
v2from
syn-6813-get-chrome-flags

Conversation

@jcsco

@jcsco jcsco commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds GetChromeFlags() in syntheticsclientv2 that calls GET /chrome_flags and returns the existing ChromeFlagsResponse struct (previously dead code), following the GetExcludedFileTypesV2 single-GET pattern.
  • Adds unit tests covering the happy path, malformed JSON response, and network failure.

This is a prerequisite for wiring up a synthetics_chrome_flags data source in terraform-provider-synthetics (SYN-6813), which will land once this client change is released.

Test plan

  • go test ./syntheticsclientv2/... -run ChromeFlags -v passes
  • go build ./... and go vet ./... clean

Jira: https://splunk.atlassian.net/browse/SYN-6813

Wires up the existing ChromeFlagsResponse struct as the first caller,
following the GetExcludedFileTypesV2 pattern.
@jcsco
jcsco requested a review from a team as a code owner August 12, 2026 01:05
@jcsco
jcsco requested review from etipton-splunk and jinja2 and removed request for a team August 12, 2026 01:05
Follows the TestLiveGetExcludedFileTypesV2 pattern for a no-args
live GET endpoint.
@github-actions

Copy link
Copy Markdown

Code Coverage Report:

Total coverage threshold (90%) satisfied:	PASS
Total test coverage: 94.5% (942/997)

No coverage changes in any files compared to the base.

@splunk splunk deleted a comment from github-actions Bot Aug 12, 2026
@jcsco jcsco self-assigned this Aug 12, 2026
@jcsco jcsco added the enhancement New feature or request label Aug 12, 2026
@jcsco
jcsco requested a review from bchhay-splunk August 12, 2026 15:47
Comment thread syntheticsclientv2/get_chromeflags_test.go Outdated
…hape

The GET /chrome_flags endpoint returns a catalog of supported flags
(name, label, description, acceptsValue), not name/value pairs set on
a check. Introduce ChromeFlagOption for that shape and use it in
ChromeFlagsResponse, leaving ChromeFlag (used for a check's configured
advancedSettings.chromeFlags) untouched.
@github-actions

Copy link
Copy Markdown

Integration Test: ✅ Passed

View run

Live integration tests — Total: 60 | Passed: 60 | Failed: 0 | Skipped: 0

Test Result Duration (s)
TestLiveApiCheckCreateUpdateAndDeleteV2 ✅ Pass 1.58
TestLiveBrowserCheckCreateUpdateAndDeleteV2 ✅ Pass 1.82
TestLiveCaCertificateCreateUpdateAndDeleteV2 ✅ Pass 1.26
TestLiveClientCertificateCreateUpdateAndDeleteV2 ✅ Pass 1.28
TestLiveCreateApiCheckV2 ✅ Pass 0.52
TestLiveCreateBrowserCheckV2 ✅ Pass 0.61
TestLiveCreateCaCertificateV2 ✅ Pass 0.51
TestLiveCreateClientCertificateV2 ✅ Pass 0.54
TestLiveCreateHttpCheckV2 ✅ Pass 0.54
TestLiveCreateLocationV2 ✅ Pass 0.49
TestLiveCreatePortCheckV2 ✅ Pass 0.5
TestLiveCreateSslCheckV2 ✅ Pass 0.52
TestLiveCreateTotpVariableV2 ✅ Pass 0.49
TestLiveCreateVariableV2 ✅ Pass 0.55
TestLiveCreateVariableV2ReturnsErrorOnDuplicateName ✅ Pass 0.68
TestLiveDeleteApiCheckV2 ✅ Pass 0.51
TestLiveDeleteApiCheckV2ReturnsErrorForNonexistentID ✅ Pass 0.22
TestLiveDeleteBrowserCheckV2 ✅ Pass 0.5
TestLiveDeleteCaCertificateV2 ✅ Pass 0.51
TestLiveDeleteClientCertificateV2 ✅ Pass 0.51
TestLiveDeleteHttpCheckV2 ✅ Pass 0.65
TestLiveDeleteLocationV2 ✅ Pass 0.47
TestLiveDeletePortCheckV2 ✅ Pass 0.54
TestLiveDeleteSslCheckV2 ✅ Pass 0.52
TestLiveDeleteTotpVariableV2 ✅ Pass 0.49
TestLiveDeleteVariableV2 ✅ Pass 0.62
TestLiveDowntimeConfigurationCreateUpdateAndDeleteV2 ✅ Pass 1.77
TestLiveGetApiCheckV2 ✅ Pass 0.86
TestLiveGetBrowserCheckV2 ✅ Pass 0.75
TestLiveGetCaCertificateV2 ✅ Pass 0.72
TestLiveGetChecksV2 ✅ Pass 0.67
TestLiveGetChromeFlags ✅ Pass 0.22
TestLiveGetClientCertificateV2 ✅ Pass 0.79
TestLiveGetDevicesV2 ✅ Pass 0.23
TestLiveGetDowntimeConfigurationsV2 ✅ Pass 1.39
TestLiveGetExcludedFileTypesV2 ✅ Pass 0.22
TestLiveGetHttpCheckV2 ✅ Pass 0.76
TestLiveGetHttpCheckV2ReturnsErrorForNonexistentID ✅ Pass 0.22
TestLiveGetLocationsV2 ✅ Pass 0.22
TestLiveGetLocationV2 ✅ Pass 0.22
TestLiveGetPortCheckV2 ✅ Pass 0.74
TestLiveGetSslCheckV2 ✅ Pass 0.87
TestLiveGetTotpVariableV2 ✅ Pass 0.7
TestLiveGetVariablesV2 ✅ Pass 0.71
TestLiveGetVariableV2 ✅ Pass 0.71
TestLiveGetVariableV2ReturnsErrorForNonexistentID ✅ Pass 0.22
TestLiveHttpCheckCreateUpdateDeleteV2 ✅ Pass 1.93
TestLiveHttpCheckWithNullablePortCreateUpdateAndDeleteV2 ✅ Pass 1.04
TestLivePortCheckCreateUpdateAndDeleteV2 ✅ Pass 1.47
TestLiveSslCheckCreateUpdateAndDeleteV2 ✅ Pass 1.07
TestLiveTotpVariableCreateUpdateAndDeleteV2 ✅ Pass 1.17
TestLiveUpdateApiCheckV2 ✅ Pass 0.82
TestLiveUpdateBrowserCheckV2 ✅ Pass 0.84
TestLiveUpdateCaCertificateV2 ✅ Pass 0.98
TestLiveUpdateClientCertificateV2 ✅ Pass 0.95
TestLiveUpdateHttpCheckV2 ✅ Pass 0.82
TestLiveUpdatePortCheckV2 ✅ Pass 0.76
TestLiveUpdateSslCheckV2 ✅ Pass 1
TestLiveUpdateTotpVariableV2 ✅ Pass 0.91
TestLiveUpdateVariableV2 ✅ Pass 0.82

@splunk splunk deleted a comment from github-actions Bot Aug 12, 2026
@jcsco
jcsco merged commit 287af50 into v2 Aug 12, 2026
6 checks passed
@jcsco
jcsco deleted the syn-6813-get-chrome-flags branch August 12, 2026 20:24
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants