Skip to content

Commit

Permalink
Merge pull request #29 from catchpoint/AZU186278
Browse files Browse the repository at this point in the history
Azu186278
  • Loading branch information
vikashkuma authored Mar 12, 2024
2 parents 9dda28c + 46c91bd commit da7b2e7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
1 change: 0 additions & 1 deletion catchpoint/resource_playwright_test_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,6 @@ func resourcePlaywrightTestCreate(d *schema.ResourceData, m interface{}) error {
}

log.Printf("[DEBUG] Creating test: " + test_name)
log.Printf("[DEBUG] jsonStr : %#v", jsonStr)
respBody, respStatus, testId, err := createTest(api_token, jsonStr)
if err != nil {
log.Fatal(err)
Expand Down
20 changes: 20 additions & 0 deletions catchpoint/resource_puppeteer_test_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,26 @@ func resourcePuppeteerTestType() *schema.Resource {
Optional: true,
Description: "Optional. Test status: active or inactive",
},
"label": {
Type: schema.TypeSet,
Optional: true,
Description: "Optional. Label with key, values pair",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"key": {
Type: schema.TypeString,
Required: true,
},
"values": {
Type: schema.TypeList,
Required: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
},
},
},
"thresholds": {
Type: schema.TypeSet,
Optional: true,
Expand Down
18 changes: 18 additions & 0 deletions docs/examples/Create test/puppeteer_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ resource "puppeteer_test" "test" {
additional_monitor="ping icmp"
}

label {
key="label1"
values=["v1","v2"]
}

request_settings {
authentication {
authentication_type = "basic"
password_ids = [2332]
}
token_ids = [1096]
http_request_headers {
user_agent {
value = "vikash"
}
}
}

alert_settings {
alert_rule {
alert_type="timing"
Expand Down
10 changes: 10 additions & 0 deletions docs/resources/puppeteer_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ description: |-
- `folder_id` (Number) Optional. The Folder under which the Test will be created
- `gateway_address_or_host` (String) Host/IP to use for network troubleshooting and monitoring
- `insights` (Block Set, Max: 1) Optional. Used for overriding the insights section (see [below for nested schema](#nestedblock--insights))
- `label` (Block Set) Optional. Label with key, values pair (see [below for nested schema](#nestedblock--label))
- `monitor` (String) The monitor to use for the puppeteer Test. Supported: 'chrome'
- `request_settings` (Block Set, Max: 1) Optional. Used for overriding authentication and HTTP request headers (see [below for nested schema](#nestedblock--request_settings))
- `schedule_settings` (Block Set, Max: 1) Optional. Used for overriding the schedule section (see [below for nested schema](#nestedblock--schedule_settings))
Expand Down Expand Up @@ -162,6 +163,15 @@ Optional:
- `tracepoint_ids` (List of Number) Optional. Tracepoint ids in a list


<a id="nestedblock--label"></a>
### Nested Schema for `label`

Required:

- `key` (String)
- `values` (List of String)


<a id="nestedblock--request_settings"></a>
### Nested Schema for `request_settings`

Expand Down

0 comments on commit da7b2e7

Please sign in to comment.