Skip to content

Commit

Permalink
helper/logging: Update test Content-Type header to match terraform.io…
Browse files Browse the repository at this point in the history
… change (#1045)

Reference: https://github.com/hashicorp/terraform-plugin-sdk/actions/runs/2970165412

Previously:

```
--- FAIL: TestNewLoggingHTTPTransport (0.27s)
    /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/logging/logging_http_transport_test.go:93: Unexpected value for field "Content-Type"; expected "text/html", got "text/html; charset=utf-8"
```

Double checking the current situation with `curl`:

```console
$ curl -I -s https://www.terraform.io | grep -i content-type
content-type: text/html; charset=utf-8
```
  • Loading branch information
bflad committed Sep 2, 2022
1 parent 1423b82 commit a5eecf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helper/logging/logging_http_transport_test.go
Expand Up @@ -81,7 +81,7 @@ func TestNewLoggingHTTPTransport(t *testing.T) {
"@level": "debug",
"@module": "provider",
"@message": "Received HTTP Response",
"Content-Type": "text/html",
"Content-Type": "text/html; charset=utf-8",
"tf_http_op_type": "response",
"tf_http_res_status_code": float64(200),
"tf_http_res_version": "HTTP/2.0",
Expand Down Expand Up @@ -172,7 +172,7 @@ func TestNewSubsystemLoggingHTTPTransport(t *testing.T) {
"@level": "debug",
"@module": "provider.test-subsystem",
"@message": "Received HTTP Response",
"Content-Type": "text/html",
"Content-Type": "text/html; charset=utf-8",
"tf_http_op_type": "response",
"tf_http_res_status_code": float64(200),
"tf_http_res_version": "HTTP/2.0",
Expand Down

0 comments on commit a5eecf7

Please sign in to comment.