Skip to content

Commit

Permalink
chore: change to 'http_success'
Browse files Browse the repository at this point in the history
  • Loading branch information
bschaatsbergen committed Mar 15, 2024
1 parent 7ef446a commit baa9ac0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/functions/is_http_2xx.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "http_2xx function - terraform-provider-assert"
page_title: "http_success function - terraform-provider-assert"
subcategory: ""
description: |-
Checks whether the HTTP status code is a valid 2xx status code
---

# function: http_2xx
# function: http_success



Expand All @@ -16,7 +16,7 @@ description: |-

<!-- signature generated by tfplugindocs -->
```text
http_2xx(status_code number) bool
http_success(status_code number) bool
```

## Arguments
Expand Down
4 changes: 2 additions & 2 deletions examples/functions/is_http_2xx/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ data "http" "example" {
}
}

output "http_2xx" {
value = provider::assert::http_2xx(data.http.example.status_code)
output "http_success" {
value = provider::assert::http_success(data.http.example.status_code)
}
6 changes: 3 additions & 3 deletions internal/provider/http_success_function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestIsHTTP2XXFunction_basic(t *testing.T) {
{
Config: `
output "test" {
value = provider::assert::http_2xx(200)
value = provider::assert::http_success(200)
}
`,
Check: resource.ComposeAggregateTestCheckFunc(
Expand All @@ -45,7 +45,7 @@ func TestIsHTTP2XXFunction_httpCreated(t *testing.T) {
http_created = 201
}
output "test" {
value = provider::assert::http_2xx(local.http_created)
value = provider::assert::http_success(local.http_created)
}
`,
Check: resource.ComposeAggregateTestCheckFunc(
Expand All @@ -69,7 +69,7 @@ func TestIsHTTP2XXFunction_httpForbidden(t *testing.T) {
forbidden = 403
}
output "test" {
value = provider::assert::http_2xx(local.forbidden)
value = provider::assert::http_success(local.forbidden)
}
`,
Check: resource.ComposeAggregateTestCheckFunc(
Expand Down

0 comments on commit baa9ac0

Please sign in to comment.