From 654660dafc29748531a8b8524711dbe04060ed3c Mon Sep 17 00:00:00 2001 From: Matias Bordese Date: Thu, 10 Oct 2024 15:49:35 -0300 Subject: [PATCH] Parametrize escalation chain naming --- internal/resources/oncall/resource_escalation_test.go | 6 +++--- internal/resources/oncall/resource_route_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/resources/oncall/resource_escalation_test.go b/internal/resources/oncall/resource_escalation_test.go index 2be61b913..270ede683 100644 --- a/internal/resources/oncall/resource_escalation_test.go +++ b/internal/resources/oncall/resource_escalation_test.go @@ -88,11 +88,11 @@ resource "grafana_oncall_integration" "test-acc-integration" { } resource "grafana_oncall_escalation_chain" "test-acc-escalation-chain"{ - name = "acc-test" + name = "acc-test-%s" } resource "grafana_team" "test-acc-team" { - name = "acc-escalation-test" + name = "acc-escalation-test-%s" } resource "grafana_oncall_escalation" "test-acc-escalation" { @@ -125,7 +125,7 @@ resource "grafana_oncall_escalation" "test-acc-escalation-policy-declare-inciden severity = "critical" position = 3 } -`, riName, reType, reDuration) +`, riName, riName, riName, reType, reDuration) } func testAccCheckOnCallEscalationResourceExists(name string) resource.TestCheckFunc { diff --git a/internal/resources/oncall/resource_route_test.go b/internal/resources/oncall/resource_route_test.go index 1deead940..6251f2ee5 100644 --- a/internal/resources/oncall/resource_route_test.go +++ b/internal/resources/oncall/resource_route_test.go @@ -63,7 +63,7 @@ resource "grafana_oncall_integration" "test-acc-integration" { } resource "grafana_oncall_escalation_chain" "test-acc-escalation-chain"{ - name = "acc-test" + name = "acc-test-%s" } resource "grafana_oncall_route" "test-acc-route" { @@ -78,7 +78,7 @@ resource "grafana_oncall_route" "test-acc-route" { enabled = false } } -`, riName, rrRegex) +`, riName, riName, rrRegex) } func testAccCheckOnCallRouteResourceExists(name string) resource.TestCheckFunc {