From c5a87bd12809d8b32f643cef82b9b816f3a0ac34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ka=C4=9Fan=20=C3=9Cst=C3=BCngel?= Date: Tue, 24 May 2022 04:03:35 +0300 Subject: [PATCH] regex typo --- policy_set_integration_test.go | 4 ++-- registry_module_integration_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/policy_set_integration_test.go b/policy_set_integration_test.go index 8989be58d..e49ccf7a0 100644 --- a/policy_set_integration_test.go +++ b/policy_set_integration_test.go @@ -172,7 +172,7 @@ func TestPolicySetsCreate(t *testing.T) { assert.Equal(t, ps.VCSRepo.OAuthTokenID, oc.ID) assert.Equal(t, ps.VCSRepo.RepositoryHTTPURL, fmt.Sprintf("https://github.com/%s", githubIdentifier)) assert.Equal(t, ps.VCSRepo.ServiceProvider, string(ServiceProviderGithub)) - assert.Regexp(t, "^https://app\.terraform\.io/webhooks/vcs/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", ps.VCSRepo.WebhookURL) + assert.Regexp(t, "^https://app\\.terraform\\.io/webhooks/vcs/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", ps.VCSRepo.WebhookURL) }) t.Run("with vcs policy updated", func(t *testing.T) { @@ -209,7 +209,7 @@ func TestPolicySetsCreate(t *testing.T) { assert.Equal(t, ps.VCSRepo.OAuthTokenID, oc.ID) assert.Equal(t, ps.VCSRepo.RepositoryHTTPURL, fmt.Sprintf("https://github.com/%s", githubIdentifier)) assert.Equal(t, ps.VCSRepo.ServiceProvider, string(ServiceProviderGithub)) - assert.Regexp(t, "^https://app\.terraform\.io/webhooks/vcs/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", ps.VCSRepo.WebhookURL) + assert.Regexp(t, "^https://app\\.terraform\\.io/webhooks/vcs/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", ps.VCSRepo.WebhookURL) }) t.Run("without a name provided", func(t *testing.T) { diff --git a/registry_module_integration_test.go b/registry_module_integration_test.go index 7975e45b5..a6bcefd2f 100644 --- a/registry_module_integration_test.go +++ b/registry_module_integration_test.go @@ -272,7 +272,7 @@ func TestRegistryModulesCreateWithVCSConnection(t *testing.T) { assert.Equal(t, rm.VCSRepo.OAuthTokenID, oauthTokenTest.ID) assert.Equal(t, rm.VCSRepo.RepositoryHTTPURL, fmt.Sprintf("https://github.com/%s", githubIdentifier)) assert.Equal(t, rm.VCSRepo.ServiceProvider, string(ServiceProviderGithub)) - assert.Regexp(t, "^https://app\.terraform\.io/webhooks/vcs/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", rm.VCSRepo.WebhookURL) + assert.Regexp(t, "^https://app\\.terraform\\.io/webhooks/vcs/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", rm.VCSRepo.WebhookURL) t.Run("permissions are properly decoded", func(t *testing.T) { assert.True(t, rm.Permissions.CanDelete)