Skip to content

Commit 901b758

Browse files
api-clients-generation-pipeline[bot]romainbergerci.datadog-api-spec
authored
Add follow_redirects options to test request in Synthetics (#1096)
* [Synthetics] Update tests * Regenerate client from commit 7c115a3 of spec repo Co-authored-by: Romain Berger <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 514e50c commit 901b758

File tree

8 files changed

+145
-66
lines changed

8 files changed

+145
-66
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.1.dev11",
7-
"regenerated": "2021-09-08 14:45:58.928142",
8-
"spec_repo_commit": "b4ace00"
7+
"regenerated": "2021-09-09 11:05:10.366109",
8+
"spec_repo_commit": "7c115a3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev11",
12-
"regenerated": "2021-09-08 14:46:28.867203",
13-
"spec_repo_commit": "b4ace00"
12+
"regenerated": "2021-09-09 11:05:46.215248",
13+
"spec_repo_commit": "7c115a3"
1414
}
1515
}
1616
}

api/v1/datadog/api/openapi.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20396,6 +20396,7 @@ components:
2039620396
dnsServerPort: 5249
2039720397
host: host
2039820398
numberOfPackets: 6
20399+
follow_redirects: true
2039920400
dnsServer: dnsServer
2040020401
allowFailure: true
2040120402
name: name
@@ -20495,6 +20496,7 @@ components:
2049520496
dnsServerPort: 5249
2049620497
host: host
2049720498
numberOfPackets: 6
20499+
follow_redirects: true
2049820500
dnsServer: dnsServer
2049920501
assertions: []
2050020502
steps:
@@ -20535,6 +20537,7 @@ components:
2053520537
dnsServerPort: 5249
2053620538
host: host
2053720539
numberOfPackets: 6
20540+
follow_redirects: true
2053820541
dnsServer: dnsServer
2053920542
allowFailure: true
2054020543
name: name
@@ -20577,6 +20580,7 @@ components:
2057720580
dnsServerPort: 5249
2057820581
host: host
2057920582
numberOfPackets: 6
20583+
follow_redirects: true
2058020584
dnsServer: dnsServer
2058120585
allowFailure: true
2058220586
name: name
@@ -20663,6 +20667,7 @@ components:
2066320667
dnsServerPort: 5249
2066420668
host: host
2066520669
numberOfPackets: 6
20670+
follow_redirects: true
2066620671
dnsServer: dnsServer
2066720672
assertions: []
2066820673
steps:
@@ -20703,6 +20708,7 @@ components:
2070320708
dnsServerPort: 5249
2070420709
host: host
2070520710
numberOfPackets: 6
20711+
follow_redirects: true
2070620712
dnsServer: dnsServer
2070720713
allowFailure: true
2070820714
name: name
@@ -20745,6 +20751,7 @@ components:
2074520751
dnsServerPort: 5249
2074620752
host: host
2074720753
numberOfPackets: 6
20754+
follow_redirects: true
2074820755
dnsServer: dnsServer
2074920756
allowFailure: true
2075020757
name: name
@@ -20946,6 +20953,7 @@ components:
2094620953
dnsServerPort: 5249
2094720954
host: host
2094820955
numberOfPackets: 6
20956+
follow_redirects: true
2094920957
dnsServer: dnsServer
2095020958
variables:
2095120959
- name: VARIABLE_NAME
@@ -21253,6 +21261,7 @@ components:
2125321261
dnsServerPort: 5249
2125421262
host: host
2125521263
numberOfPackets: 6
21264+
follow_redirects: true
2125621265
dnsServer: dnsServer
2125721266
variables:
2125821267
- name: VARIABLE_NAME
@@ -21362,6 +21371,7 @@ components:
2136221371
dnsServerPort: 5249
2136321372
host: host
2136421373
numberOfPackets: 6
21374+
follow_redirects: true
2136521375
dnsServer: dnsServer
2136621376
variables:
2136721377
- name: VARIABLE_NAME
@@ -21640,6 +21650,7 @@ components:
2164021650
dnsServerPort: 5249
2164121651
host: host
2164221652
numberOfPackets: 6
21653+
follow_redirects: true
2164321654
dnsServer: dnsServer
2164421655
variables:
2164521656
- name: VARIABLE_NAME
@@ -22443,6 +22454,7 @@ components:
2244322454
dnsServerPort: 5249
2244422455
host: host
2244522456
numberOfPackets: 6
22457+
follow_redirects: true
2244622458
dnsServer: dnsServer
2244722459
variables:
2244822460
- name: VARIABLE_NAME
@@ -22528,6 +22540,7 @@ components:
2252822540
dnsServerPort: 5249
2252922541
host: host
2253022542
numberOfPackets: 6
22543+
follow_redirects: true
2253122544
dnsServer: dnsServer
2253222545
variables:
2253322546
- name: VARIABLE_NAME
@@ -23000,6 +23013,7 @@ components:
2300023013
dnsServerPort: 5249
2300123014
host: host
2300223015
numberOfPackets: 6
23016+
follow_redirects: true
2300323017
dnsServer: dnsServer
2300423018
variables:
2300523019
- name: VARIABLE_NAME
@@ -23096,6 +23110,7 @@ components:
2309623110
dnsServerPort: 5249
2309723111
host: host
2309823112
numberOfPackets: 6
23113+
follow_redirects: true
2309923114
dnsServer: dnsServer
2310023115
variables:
2310123116
- name: VARIABLE_NAME
@@ -23372,6 +23387,7 @@ components:
2337223387
dnsServerPort: 5249
2337323388
host: host
2337423389
numberOfPackets: 6
23390+
follow_redirects: true
2337523391
dnsServer: dnsServer
2337623392
properties:
2337723393
allow_insecure:
@@ -23394,6 +23410,9 @@ components:
2339423410
maximum: 65535
2339523411
minimum: 1
2339623412
type: integer
23413+
follow_redirects:
23414+
description: Specifies whether or not the request follows redirects.
23415+
type: boolean
2339723416
headers:
2339823417
additionalProperties:
2339923418
description: A single Header.
@@ -30528,6 +30547,7 @@ components:
3052830547
dnsServerPort: 5249
3052930548
host: host
3053030549
numberOfPackets: 6
30550+
follow_redirects: true
3053130551
dnsServer: dnsServer
3053230552
variables:
3053330553
- name: VARIABLE_NAME
@@ -30617,6 +30637,7 @@ components:
3061730637
dnsServerPort: 5249
3061830638
host: host
3061930639
numberOfPackets: 6
30640+
follow_redirects: true
3062030641
dnsServer: dnsServer
3062130642
variables:
3062230643
- name: VARIABLE_NAME

api/v1/datadog/docs/SyntheticsTestRequest.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**Certificate** | Pointer to [**SyntheticsTestRequestCertificate**](SyntheticsTestRequestCertificate.md) | | [optional]
1111
**DnsServer** | Pointer to **string** | DNS server to use for DNS tests. | [optional]
1212
**DnsServerPort** | Pointer to **int32** | DNS server port to use for DNS tests. | [optional]
13+
**FollowRedirects** | Pointer to **bool** | Specifies whether or not the request follows redirects. | [optional]
1314
**Headers** | Pointer to **map[string]string** | Headers to include when performing the test. | [optional]
1415
**Host** | Pointer to **string** | Host name to perform the test with. | [optional]
1516
**Method** | Pointer to [**HTTPMethod**](HTTPMethod.md) | | [optional]
@@ -190,6 +191,31 @@ SetDnsServerPort sets DnsServerPort field to given value.
190191

191192
HasDnsServerPort returns a boolean if a field has been set.
192193

194+
### GetFollowRedirects
195+
196+
`func (o *SyntheticsTestRequest) GetFollowRedirects() bool`
197+
198+
GetFollowRedirects returns the FollowRedirects field if non-nil, zero value otherwise.
199+
200+
### GetFollowRedirectsOk
201+
202+
`func (o *SyntheticsTestRequest) GetFollowRedirectsOk() (*bool, bool)`
203+
204+
GetFollowRedirectsOk returns a tuple with the FollowRedirects field if it's non-nil, zero value otherwise
205+
and a boolean to check if the value has been set.
206+
207+
### SetFollowRedirects
208+
209+
`func (o *SyntheticsTestRequest) SetFollowRedirects(v bool)`
210+
211+
SetFollowRedirects sets FollowRedirects field to given value.
212+
213+
### HasFollowRedirects
214+
215+
`func (o *SyntheticsTestRequest) HasFollowRedirects() bool`
216+
217+
HasFollowRedirects returns a boolean if a field has been set.
218+
193219
### GetHeaders
194220

195221
`func (o *SyntheticsTestRequest) GetHeaders() map[string]string`

api/v1/datadog/model_synthetics_test_request.go

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/api/v1/datadog/api_synthetics_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,12 @@ func getTestSyntheticsAPIMultistep(ctx context.Context, t *testing.T, globalVari
121121
Assertions: &[]datadog.SyntheticsAssertion{},
122122
Name: datadog.PtrString("First step"),
123123
Request: &datadog.SyntheticsTestRequest{
124-
Headers: &map[string]string{"testingGoClient": "true"},
125-
Method: datadog.HTTPMETHOD_GET.Ptr(),
126-
Timeout: datadog.PtrFloat64(10),
127-
Url: datadog.PtrString("https://datadoghq.com"),
128-
AllowInsecure: datadog.PtrBool(true),
124+
Headers: &map[string]string{"testingGoClient": "true"},
125+
Method: datadog.HTTPMETHOD_GET.Ptr(),
126+
Timeout: datadog.PtrFloat64(10),
127+
Url: datadog.PtrString("https://datadoghq.com"),
128+
AllowInsecure: datadog.PtrBool(true),
129+
FollowRedirects: datadog.PtrBool(true),
129130
},
130131
Subtype: datadog.SYNTHETICSAPISTEPSUBTYPE_HTTP.Ptr(),
131132
ExtractedValues: &[]datadog.SyntheticsParsingOptions{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021-07-13T16:45:43.873123+02:00
1+
2021-09-06T16:57:44.257696+02:00

0 commit comments

Comments
 (0)