Skip to content

Commit 8fa7cad

Browse files
Mic92wxiaoguang
andauthored
Update tests/integration/api_repo_archive_test.go
Co-authored-by: wxiaoguang <[email protected]>
1 parent a5a88ef commit 8fa7cad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration/api_repo_archive_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestAPIDownloadArchive(t *testing.T) {
4141
assert.Len(t, bs, 266)
4242

4343
// Must return a link to a commit ID as the "immutable" archive link
44-
linkHeaderRe := regexp.MustCompile(`<(?P<url>https?://.*/api/v1/repos/user2/repo1/archive/[a-f0-9]+\.tar\.gz.*)>; rel="immutable"`)
44+
linkHeaderRe := regexp.MustCompile(`^<(https?://.*/api/v1/repos/user2/repo1/archive/[a-f0-9]+\.tar\.gz.*)>; rel="immutable"$`)
4545
m := linkHeaderRe.FindStringSubmatch(resp.Header().Get("Link"))
4646
assert.NotEmpty(t, m[1])
4747
resp = MakeRequest(t, NewRequest(t, "GET", m[1]).AddTokenAuth(token), http.StatusOK)

0 commit comments

Comments
 (0)