Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hashicorp/terraform-provider-http
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 492c2a297caa6afcad61ac1fa89c11ab32e86d5a
Choose a base ref
..
head repository: hashicorp/terraform-provider-http
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f676eabff642efec1e43172a23834261a4938ffd
Choose a head ref
Showing with 6 additions and 6 deletions.
  1. +6 −6 internal/provider/data_source_http_test.go
12 changes: 6 additions & 6 deletions internal/provider/data_source_http_test.go
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ func TestDataSource_WithCACertificate(t *testing.T) {
{
Config: fmt.Sprintf(`
data "http" "http_test" {
url = "%s/x509-ca-cert/200"
url = "%s"
ca_certificate = <<EOF
%s
@@ -260,7 +260,7 @@ func TestDataSource_InsecureTrue(t *testing.T) {
{
Config: fmt.Sprintf(`
data "http" "http_test" {
url = "%s/x509-ca-cert/200"
url = "%s"
insecure = true
}`, svr.URL),
@@ -285,11 +285,11 @@ func TestDataSource_InsecureFalse(t *testing.T) {
{
Config: fmt.Sprintf(`
data "http" "http_test" {
url = "%s/x509-ca-cert/200"
url = "%s"
insecure = false
}`, svr.URL),
ExpectError: regexp.MustCompile(fmt.Sprintf(`Error making request: Get ".+": x509:\n“Acme Co” certificate is not trusted`)),
ExpectError: regexp.MustCompile(fmt.Sprintf(`Error making request: Get "%s": x509: “Acme Co”\ncertificate is not trusted`, svr.URL)),
},
},
})
@@ -308,9 +308,9 @@ func TestDataSource_InsecureUnconfigured(t *testing.T) {
{
Config: fmt.Sprintf(`
data "http" "http_test" {
url = "%s/x509-ca-cert/200"
url = "%s"
}`, svr.URL),
ExpectError: regexp.MustCompile(fmt.Sprintf(`Error making request: Get ".+": x509:\n“Acme Co” certificate is not trusted`)),
ExpectError: regexp.MustCompile(fmt.Sprintf(`Error making request: Get "%s": x509: “Acme Co”\ncertificate is not trusted`, svr.URL)),
},
},
})