"filters": [][]string{{"name", "=", repoName}},
}, &reposFound); err != nil {
statusCode, statusText = http.StatusInternalServerError, err.Error()
- validApiToken = true
return
}
+ validApiToken = true
if avail, ok := reposFound["items_available"].(float64); !ok {
statusCode, statusText = http.StatusInternalServerError, "bad list response from API"
return
func (s *IntegrationSuite) TestShortToken(c *check.C) {
for _, repo := range []string{"active/foo.git", "active/foo/.git"} {
err := s.runGit(c, "s3cr3t", "fetch", repo)
- c.Assert(err, check.ErrorMatches, `.* Authentication failed.*`)
+ c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`)
}
}