Optimize [githubsearch] tests by using a smaller repo (#2734)

These seem to run in 300-900 ms.
This commit is contained in:
Paul Melnikow
2019-01-11 13:47:48 -05:00
committed by GitHub
parent 048291a024
commit 269fbd056c

View File

@@ -6,11 +6,11 @@ const { isMetric } = require('../test-validators')
const t = (module.exports = require('../create-service-tester')())
t.create('hit counter')
.get('/torvalds/linux/goto.json')
.timeout(10000)
.expectJSONTypes(Joi.object().keys({ name: 'goto counter', value: isMetric }))
.get('/badges/shields/async%20handle.json')
.expectJSONTypes(
Joi.object().keys({ name: 'async handle counter', value: isMetric })
)
t.create('hit counter for nonexistent repo')
.get('/torvalds/not-linux/goto.json')
.timeout(10000)
.expectJSON({ name: 'goto counter', value: 'repo not found' })
.get('/badges/puppets/async%20handle.json')
.expectJSON({ name: 'async handle counter', value: 'repo not found' })