|
|
@ -122,7 +122,7 @@ func TestPackageNuGet(t *testing.T) { |
|
|
|
|
|
|
|
|
|
|
|
req = NewRequestWithBody(t, "PUT", url, bytes.NewReader(content)) |
|
|
|
req = NewRequestWithBody(t, "PUT", url, bytes.NewReader(content)) |
|
|
|
req = AddBasicAuthHeader(req, user.Name) |
|
|
|
req = AddBasicAuthHeader(req, user.Name) |
|
|
|
MakeRequest(t, req, http.StatusBadRequest) |
|
|
|
MakeRequest(t, req, http.StatusConflict) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
t.Run("SymbolPackage", func(t *testing.T) { |
|
|
|
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 = NewRequestWithBody(t, "PUT", fmt.Sprintf("%s/symbolpackage", url), createPackage(packageName, "SymbolsPackage")) |
|
|
|
req = AddBasicAuthHeader(req, user.Name) |
|
|
|
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 := NewRequest(t, "DELETE", fmt.Sprintf("%s/%s/%s", url, packageName, packageVersion)) |
|
|
|
req = AddBasicAuthHeader(req, user.Name) |
|
|
|
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) |
|
|
|
pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeNuGet) |
|
|
|
assert.NoError(t, err) |
|
|
|
assert.NoError(t, err) |
|
|
|