From e46a00132f35cbdf5f5516d7917a7c97fc5185c6 Mon Sep 17 00:00:00 2001 From: Benjamin Smith Date: Mon, 22 Jul 2024 10:38:30 -0700 Subject: [PATCH] update tests --- test/src/examples_complete_test.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/src/examples_complete_test.go b/test/src/examples_complete_test.go index 6cb89cd..13d52c0 100644 --- a/test/src/examples_complete_test.go +++ b/test/src/examples_complete_test.go @@ -43,23 +43,27 @@ func TestExamplesComplete(t *testing.T) { outputApiIntegrationName := terraform.Output(t, terraformOptions, "api_integration_name") // Verify we're getting back the outputs we expect - assert.Regexp(t, "^eg-test-incident-management-workflow$", outputApiIntegrationName) + expectedWorkflowName := "eg-test-incident-management-workflow-" + randID + assert.Equal(t, expectedWorkflowName, outputApiIntegrationName) // Run `terraform output` to get the value of an output variable + outputEscalationName := terraform.Output(t, terraformOptions, "escalation_name") + expectedEscalationName := "eg-test-incident-management-workflow-" + randID + "-escalation" // Verify we're getting back the outputs we expect - assert.Regexp(t, "^eg-test-incident-management-workflow-escalation$", outputEscalationName) + assert.Equal(t, expectedEscalationName, outputEscalationName) // Run `terraform output` to get the value of an output variable outputTeamRoutingRuleName := terraform.Output(t, terraformOptions, "team_routing_rule_name") + expectedTeamRoutingRuleName := "eg-test-incident-management-workflow-" + randID // Verify we're getting back the outputs we expect - assert.Regexp(t, "^eg-test-incident-management-workflow$", outputTeamRoutingRuleName) + assert.Equal(t, expectedTeamRoutingRuleName, outputTeamRoutingRuleName) // Run `terraform output` to get the value of an output variable outputTeamName := terraform.Output(t, terraformOptions, "team_name") - + expectedTeamName := "eg-test-incident-management-workflow-" + randID // Verify we're getting back the outputs we expect - assert.Regexp(t, "^eg-test-incident-management-workflow$", outputTeamName) + assert.Equal(t, expectedTeamName, outputTeamName) }