Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(synthetics_automated_testing): update to schema based on NG updates #1062

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/synthetics/synthetics_api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions pkg/synthetics/synthetics_api_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,25 @@ var (
Config: SyntheticsAutomatedTestMonitorConfigInput{
IsBlocking: true,
Overrides: &SyntheticsAutomatedTestOverridesInput{
Domain: SyntheticsScriptDomainOverrideInput{
Domain: "sample-domain",
Override: "sample-override",
Domain: []SyntheticsScriptDomainOverrideInput{
{
Domain: "sample-domain",
Override: "sample-override",
},
{
Domain: "sample-domain-two",
Override: "sample-override-two",
},
},
SecureCredential: SyntheticsSecureCredentialOverrideInput{
Key: "sample-key",
OverrideKey: "sample-override-key",
SecureCredential: []SyntheticsSecureCredentialOverrideInput{
{
Key: "sample-key",
OverrideKey: "sample-override-key",
},
{
Key: "sample-key-two",
OverrideKey: "sample-override-key-two",
},
},
StartingURL: "sample-starting-url.com",
Location: "sample-location",
Expand Down
15 changes: 8 additions & 7 deletions pkg/synthetics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,9 @@ var SyntheticsStepTypeTypes = struct {
// Account configuration data is queried through this object, as well as
// telemetry data that is specific to a single account.
type Account struct {
//
ID int `json:"id,omitempty"`
//
ID int `json:"id,omitempty"`
LicenseKey string `json:"licenseKey,omitempty"`
//
Name string `json:"name,omitempty"`
Name string `json:"name,omitempty"`
// This field provides access to Synthetics data.
Synthetics SyntheticsAccountStitchedFields `json:"synthetics,omitempty"`
}
Expand Down Expand Up @@ -701,11 +698,11 @@ type SyntheticsAutomatedTestOverrides struct {
// SyntheticsAutomatedTestOverridesInput - Automated test monitor overrides
type SyntheticsAutomatedTestOverridesInput struct {
// Override a domain throughout a scripted monitor
Domain SyntheticsScriptDomainOverrideInput `json:"domain,omitempty" yaml:"domain,omitempty"`
Domain []SyntheticsScriptDomainOverrideInput `json:"domain,omitempty" yaml:"domain,omitempty"`
// Override monitor to use a specific location
Location string `json:"location,omitempty" yaml:"location,omitempty"`
// Override a script secure credential with another credential value
SecureCredential SyntheticsSecureCredentialOverrideInput `json:"secureCredential,omitempty" yaml:"secureCredential,omitempty"`
SecureCredential []SyntheticsSecureCredentialOverrideInput `json:"secureCredential,omitempty" yaml:"secureCredential,omitempty"`
// Override a browser monitor starting url
StartingURL string `json:"startingUrl,omitempty" yaml:"startingUrl,omitempty"`
}
Expand All @@ -714,6 +711,10 @@ type SyntheticsAutomatedTestOverridesInput struct {
type SyntheticsAutomatedTestResult struct {
// Automated test config
Config SyntheticsAutomatedTestConfig `json:"config,omitempty"`
// Finished time of the automated test batch
FinishTimestamp *nrtime.EpochMilliseconds `json:"finishTimestamp,omitempty"`
// Start time of the automated test batch
StartTimestamp *nrtime.EpochMilliseconds `json:"startTimestamp,omitempty"`
// Calculated status of automated test as a whole
Status SyntheticsAutomatedTestStatus `json:"status,omitempty"`
// List of completed automated test jobs
Expand Down