Skip to content

Commit

Permalink
regex typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kgns committed May 24, 2022
1 parent 10e6b11 commit c5a87bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions policy_set_integration_test.go
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion registry_module_integration_test.go
Expand Up @@ -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)
Expand Down

0 comments on commit c5a87bd

Please sign in to comment.