diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-10-01 18:41:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 10:41:52 +0000 |
commit | 6e87a44034af3cfef1ceed3d653b3851ec2c1118 (patch) | |
tree | d79eec833680fd7aaef8bda3b143f6486d14cc22 /tests/integration | |
parent | 6b65c41ebff6a59a266247bdbbce3d012cd05ffd (diff) | |
download | gitea-6e87a44034af3cfef1ceed3d653b3851ec2c1118.tar.gz gitea-6e87a44034af3cfef1ceed3d653b3851ec2c1118.zip |
Allow get release download files and lfs files with oauth2 token format (#26430)
Fix #26165
Fix #25257
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/release_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/integration/release_test.go b/tests/integration/release_test.go index 8de761ea6c..42d0d00e78 100644 --- a/tests/integration/release_test.go +++ b/tests/integration/release_test.go @@ -239,3 +239,20 @@ func TestViewTagsList(t *testing.T) { assert.EqualValues(t, []string{"v1.0", "delete-tag", "v1.1"}, tagNames) } + +func TestDownloadReleaseAttachment(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + tests.PrepareAttachmentsStorage(t) + + repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2}) + + url := repo.Link() + "/releases/download/v1.1/README.md" + + req := NewRequest(t, "GET", url) + MakeRequest(t, req, http.StatusNotFound) + + req = NewRequest(t, "GET", url) + session := loginUser(t, "user2") + session.MakeRequest(t, req, http.StatusOK) +} |