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

Fixes for synthetics multistep tests #375

Merged
merged 2 commits into from
May 27, 2021
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-05-27 08:31:57.134253",
"spec_repo_commit": "0167d3f"
"regenerated": "2021-05-27 15:02:52.776940",
"spec_repo_commit": "5311d4c"
},
"v2": {
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-05-27 08:32:52.834305",
"spec_repo_commit": "0167d3f"
"regenerated": "2021-05-27 15:03:51.595124",
"spec_repo_commit": "5311d4c"
}
}
}
10 changes: 5 additions & 5 deletions data/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8340,8 +8340,6 @@ components:
items:
$ref: '#/components/schemas/SyntheticsAPIStep'
type: array
required:
- assertions
type: object
SyntheticsAPITestResultData:
description: Object containing results for your Synthetic API test.
Expand Down Expand Up @@ -8974,6 +8972,9 @@ components:
example:
description: Example for the variable.
type: string
id:
description: ID of the variable for global variables.
type: string
name:
description: Name of the variable.
example: VARIABLE_NAME
Expand All @@ -8984,16 +8985,17 @@ components:
type:
$ref: '#/components/schemas/SyntheticsConfigVariableType'
required:
- example
- type
- name
type: object
SyntheticsConfigVariableType:
description: Type of the configuration variable.
enum:
- global
- text
type: string
x-enum-varnames:
- GLOBAL
- TEXT
SyntheticsCoreWebVitals:
description: Core Web Vitals attached to a browser test step.
Expand Down Expand Up @@ -9635,8 +9637,6 @@ components:
items:
$ref: '#/components/schemas/SyntheticsBrowserVariable'
type: array
required:
- assertions
type: object
SyntheticsTestDetails:
description: Object containing details about your Synthetic test.
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/SyntheticsAPITestConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | |
| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | [optional] |
| **config_variables** | [**Array<SyntheticsConfigVariable>**](SyntheticsConfigVariable.md) | Array of variables used for the test. | [optional] |
| **request** | [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional] |
| **steps** | [**Array<SyntheticsAPIStep>**](SyntheticsAPIStep.md) | When the test subtype is `multi`, the steps of the test. | [optional] |
Expand Down
4 changes: 3 additions & 1 deletion docs/v1/SyntheticsConfigVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **example** | **String** | Example for the variable. | |
| **example** | **String** | Example for the variable. | [optional] |
| **id** | **String** | ID of the variable for global variables. | [optional] |
| **name** | **String** | Name of the variable. | |
| **pattern** | **String** | Pattern of the variable. | [optional] |
| **type** | [**SyntheticsConfigVariableType**](SyntheticsConfigVariableType.md) | | |
Expand All @@ -16,6 +17,7 @@ require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::SyntheticsConfigVariable.new(
example: null,
id: null,
name: VARIABLE_NAME,
pattern: null,
type: null
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/SyntheticsTestConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | |
| **assertions** | [**Array<SyntheticsAssertion>**](SyntheticsAssertion.md) | Array of assertions used for the test. | [optional] |
| **config_variables** | [**Array<SyntheticsConfigVariable>**](SyntheticsConfigVariable.md) | API tests only - array of variables used for the test. | [optional] |
| **request** | [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional] |
| **variables** | [**Array<SyntheticsBrowserVariable>**](SyntheticsBrowserVariable.md) | Browser tests only - array of variables used for the test steps. | [optional] |
Expand Down
12 changes: 6 additions & 6 deletions features/v1/synthetics.feature

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,12 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @assertions.nil?
invalid_properties.push('invalid value for "assertions", assertions cannot be nil.')
end

invalid_properties
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @assertions.nil?
true
end

Expand Down
17 changes: 11 additions & 6 deletions lib/datadog_api_client/v1/models/synthetics_config_variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class SyntheticsConfigVariable
# Example for the variable.
attr_accessor :example

# ID of the variable for global variables.
attr_accessor :id

# Name of the variable.
attr_accessor :name

Expand All @@ -34,6 +37,7 @@ class SyntheticsConfigVariable
def self.attribute_map
{
:'example' => :'example',
:'id' => :'id',
:'name' => :'name',
:'pattern' => :'pattern',
:'type' => :'type'
Expand All @@ -49,6 +53,7 @@ def self.acceptable_attributes
def self.openapi_types
{
:'example' => :'String',
:'id' => :'String',
:'name' => :'String',
:'pattern' => :'String',
:'type' => :'SyntheticsConfigVariableType'
Expand Down Expand Up @@ -80,6 +85,10 @@ def initialize(attributes = {})
self.example = attributes[:'example']
end

if attributes.key?(:'id')
self.id = attributes[:'id']
end

if attributes.key?(:'name')
self.name = attributes[:'name']
end
Expand All @@ -97,10 +106,6 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @example.nil?
invalid_properties.push('invalid value for "example", example cannot be nil.')
end

if @name.nil?
invalid_properties.push('invalid value for "name", name cannot be nil.')
end
Expand All @@ -115,7 +120,6 @@ def list_invalid_properties
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @example.nil?
return false if @name.nil?
return false if @type.nil?
true
Expand All @@ -127,6 +131,7 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
example == o.example &&
id == o.id &&
name == o.name &&
pattern == o.pattern &&
type == o.type
Expand All @@ -141,7 +146,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[example, name, pattern, type].hash
[example, id, name, pattern, type].hash
end

# Builds the object from hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

module DatadogAPIClient::V1
class SyntheticsConfigVariableType
GLOBAL = "global".freeze
TEXT = "text".freeze

# Builds the enum from string
Expand Down
5 changes: 0 additions & 5 deletions lib/datadog_api_client/v1/models/synthetics_test_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,12 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @assertions.nil?
invalid_properties.push('invalid value for "assertions", assertions cannot be nil.')
end

invalid_properties
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @assertions.nil?
true
end

Expand Down