Skip to content

Commit d138f12

Browse files
SM Check: Add HTTP versions to the test (#721)
* SM Check: Add HTTP versions to the test Closes #512 out of inactivity The tests show that all of the list https versions work * Generate docs
1 parent 69d6506 commit d138f12

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/resources/synthetic_monitoring_check.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ EOS
197197
]
198198
199199
valid_http_versions = [
200+
"HTTP/1.0",
201+
"HTTP/1.1",
200202
"HTTP/2",
201203
]
202204

examples/resources/grafana_synthetic_monitoring_check/http_complex.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ EOS
7171
]
7272

7373
valid_http_versions = [
74+
"HTTP/1.0",
75+
"HTTP/1.1",
7476
"HTTP/2",
7577
]
7678

grafana/resource_synthetic_monitoring_check_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ func TestAccResourceSyntheticMonitoringCheck_http(t *testing.T) {
105105
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.basic_auth.0.password", "sesame"),
106106
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.valid_status_codes.0", "200"),
107107
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.valid_status_codes.1", "201"),
108-
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.valid_http_versions.0", "HTTP/2"),
108+
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.valid_http_versions.0", "HTTP/1.0"),
109+
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.valid_http_versions.1", "HTTP/1.1"),
110+
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.valid_http_versions.2", "HTTP/2"),
109111
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.fail_if_body_matches_regexp.0", "*bad stuff*"),
110112
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.fail_if_body_not_matches_regexp.0", "*good stuff*"),
111113
resource.TestCheckResourceAttr("grafana_synthetic_monitoring_check.http", "settings.0.http.0.fail_if_header_matches_regexp.0.header", "Content-Type"),

0 commit comments

Comments
 (0)