Skip to content

Do some missing checks #28423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 12, 2023
Prev Previous commit
Fix bug
  • Loading branch information
lunny committed Dec 12, 2023
commit 426903d41d6fe8c08c339ac0ea7936c2a3df7b23
21 changes: 10 additions & 11 deletions tests/integration/api_packages_nuget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,16 @@ func TestPackageNuGet(t *testing.T) {
privateUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{Visibility: structs.VisibleTypePrivate})

cases := []struct {
Owner string
UseBasicAuth bool
UseTokenAuth bool
ExpectedStatus int
Owner string
UseBasicAuth bool
UseTokenAuth bool
}{
{privateUser.Name, false, false, http.StatusNotFound},
{privateUser.Name, true, false, http.StatusOK},
{privateUser.Name, false, true, http.StatusOK},
{user.Name, false, false, http.StatusOK},
{user.Name, true, false, http.StatusOK},
{user.Name, false, true, http.StatusOK},
{privateUser.Name, false, false},
{privateUser.Name, true, false},
{privateUser.Name, false, true},
{user.Name, false, false},
{user.Name, true, false},
{user.Name, false, true},
}

for _, c := range cases {
Expand All @@ -146,7 +145,7 @@ func TestPackageNuGet(t *testing.T) {
} else if c.UseTokenAuth {
req = addNuGetAPIKeyHeader(req, token)
}
resp := MakeRequest(t, req, c.ExpectedStatus)
resp := MakeRequest(t, req, http.StatusOK)

var result nuget.ServiceIndexResponseV2
decodeXML(t, resp, &result)
Expand Down