From b798f4ce86daa78e694c5c142e6f5f44938e6cb6 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 24 Jan 2024 00:14:04 +0100 Subject: [PATCH] test: add integration test --- tests/integration/api_packages_nuget_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/integration/api_packages_nuget_test.go b/tests/integration/api_packages_nuget_test.go index 20dafd5cc7..eb67693010 100644 --- a/tests/integration/api_packages_nuget_test.go +++ b/tests/integration/api_packages_nuget_test.go @@ -353,6 +353,21 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) assert.Equal(t, content, resp.Body.Bytes()) + req = NewRequest(t, "GET", fmt.Sprintf("%s/package/%s/%s/%s.nuspec", url, packageName, packageVersion, packageName)). + AddBasicAuth(user.Name) + resp = MakeRequest(t, req, http.StatusOK) + + nuspec := `` + "\n" + + `` + + `` + packageName + `` + packageVersion + `` + packageAuthors + `` + packageDescription + `` + + `` + + // https://github.com/golang/go/issues/21399 go can't generate self-closing tags + `` + + `` + + `` + + assert.Equal(t, nuspec, resp.Body.String()) + checkDownloadCount(1) req = NewRequest(t, "GET", fmt.Sprintf("%s/package/%s/%s/%s.%s.snupkg", url, packageName, packageVersion, packageName, packageVersion)).