1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00
KN4CK3R
2023-12-05 09:01:02 +01:00
committed by GitHub
parent 0aab2d38a7
commit a95d5b7702
3 changed files with 35 additions and 2 deletions

View File

@@ -149,12 +149,18 @@ gpgkey=%sapi/packages/%s/rpm/repository.key`, user.Name, user.Name, setting.AppN
url := rootURL + "/repodata"
req := NewRequest(t, "GET", url+"/dummy.xml")
req := NewRequest(t, "HEAD", url+"/dummy.xml")
MakeRequest(t, req, http.StatusNotFound)
req = NewRequest(t, "GET", url+"/dummy.xml")
MakeRequest(t, req, http.StatusNotFound)
t.Run("repomd.xml", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
req = NewRequest(t, "HEAD", url+"/repomd.xml")
MakeRequest(t, req, http.StatusOK)
req = NewRequest(t, "GET", url+"/repomd.xml")
resp := MakeRequest(t, req, http.StatusOK)