Merge pull request #1514 from coreos-inc/better-logs

Only send heavy log-based stats for repository where required
This commit is contained in:
josephschorr 2016-06-09 14:52:30 -04:00
commit 92f0db8056
3 changed files with 37 additions and 19 deletions

View file

@ -1513,7 +1513,12 @@ class TestListRepos(ApiTestCase):
class TestViewPublicRepository(ApiTestCase):
def test_normalview(self):
self.getJsonResponse(Repository, params=dict(repository='public/publicrepo'))
resp = self.getJsonResponse(Repository, params=dict(repository='public/publicrepo'))
self.assertFalse('stats' in resp)
def test_normalview_withstats(self):
resp = self.getJsonResponse(Repository, params=dict(repository='public/publicrepo', includeStats=True))
self.assertTrue('stats' in resp)
def test_anon_access_disabled(self):
import features