Skip to content

Commit

Permalink
Update tests/integration/api_repo_archive_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
Mic92 and wxiaoguang authored May 28, 2024
1 parent a5a88ef commit 8fa7cad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/api_repo_archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestAPIDownloadArchive(t *testing.T) {
assert.Len(t, bs, 266)

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

0 comments on commit 8fa7cad

Please sign in to comment.