summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-08-03 17:22:32 +0200
committerGitHub <noreply@github.com>2022-08-03 11:22:32 -0400
commit99fc419855b2e06a8e20d06dc68c86937a1ec8f7 (patch)
treedf4662443df21de3d5754d0418f7e5c8d69b723d /integrations
parent7a31292c20b057d59889337b7cf7cb419400d6cb (diff)
downloadgitea-99fc419855b2e06a8e20d06dc68c86937a1ec8f7.tar.gz
gitea-99fc419855b2e06a8e20d06dc68c86937a1ec8f7.zip
Send correct NuGet status codes (#20647)
* Fixed status codes. * Fixed status codes.
Diffstat (limited to 'integrations')
-rw-r--r--integrations/api_packages_nuget_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/api_packages_nuget_test.go b/integrations/api_packages_nuget_test.go
index e69dd0ff9b..346f391f82 100644
--- a/integrations/api_packages_nuget_test.go
+++ b/integrations/api_packages_nuget_test.go
@@ -122,7 +122,7 @@ func TestPackageNuGet(t *testing.T) {
req = NewRequestWithBody(t, "PUT", url, bytes.NewReader(content))
req = AddBasicAuthHeader(req, user.Name)
- MakeRequest(t, req, http.StatusBadRequest)
+ MakeRequest(t, req, http.StatusConflict)
})
t.Run("SymbolPackage", func(t *testing.T) {
@@ -208,7 +208,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`)
req = NewRequestWithBody(t, "PUT", fmt.Sprintf("%s/symbolpackage", url), createPackage(packageName, "SymbolsPackage"))
req = AddBasicAuthHeader(req, user.Name)
- MakeRequest(t, req, http.StatusBadRequest)
+ MakeRequest(t, req, http.StatusConflict)
})
})
@@ -352,7 +352,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`)
req := NewRequest(t, "DELETE", fmt.Sprintf("%s/%s/%s", url, packageName, packageVersion))
req = AddBasicAuthHeader(req, user.Name)
- MakeRequest(t, req, http.StatusOK)
+ MakeRequest(t, req, http.StatusNoContent)
pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeNuGet)
assert.NoError(t, err)