Skip to content

Commit d41a2bd

Browse files
authored
chore(tests): fix test assertion (#126)
1 parent 8893e02 commit d41a2bd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

internal/analysis/analysis_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,8 @@ func validateTestRequestBody(t *testing.T, request io.Reader) {
174174
bundle, err := testRequestBody.Data.Attributes.Input.AsTestInputSourceBundle()
175175
assert.NoError(t, err)
176176

177-
if bundle.Metadata.CommitId != nil {
178-
assert.Regexp(t, "^[0-9a-f]{40}$", *bundle.Metadata.CommitId)
179-
}
180-
if bundle.Metadata.RepoUrl != nil {
181-
assert.Regexp(t, "^[email protected]:[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+.git$", *bundle.Metadata.RepoUrl)
177+
if bundle.Metadata.CommitId != nil || bundle.Metadata.RepoUrl != nil {
178+
assert.NotEqual(t, *bundle.Metadata.RepoUrl, *bundle.Metadata.CommitId)
182179
}
183180
}
184181

0 commit comments

Comments
 (0)