Skip to content

Commit

Permalink
fix(synthetics_automated_testing): update to schema based on NG updat…
Browse files Browse the repository at this point in the history
…es (#1062)
  • Loading branch information
pranav-new-relic authored Nov 2, 2023
1 parent 9b92895 commit 1f997c2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
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

0 comments on commit 1f997c2

Please sign in to comment.