tests: improve reliability of Snyk tests (#3900)
This commit is contained in:
@@ -8,8 +8,8 @@ const {
|
||||
} = require('./snyk-test-helpers')
|
||||
|
||||
t.create('valid repo')
|
||||
.get('/badges/shields.json')
|
||||
.timeout(10000)
|
||||
.get('/snyk/snyk.json')
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: Joi.number().required(),
|
||||
@@ -17,15 +17,15 @@ t.create('valid repo')
|
||||
|
||||
t.create('non existent repo')
|
||||
.get('/badges/not-real.json')
|
||||
.timeout(10000)
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: 'repo or manifest not found',
|
||||
})
|
||||
|
||||
t.create('valid target manifest path')
|
||||
.get('/badges/shields/gh-badges/package.json.json')
|
||||
.timeout(10000)
|
||||
.get('/snyk/vulndb-fixtures/packages/cli/0.1.0/package.json.json')
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: Joi.number().required(),
|
||||
@@ -33,7 +33,7 @@ t.create('valid target manifest path')
|
||||
|
||||
t.create('invalid target manifest path')
|
||||
.get('/badges/shields/gh-badges/requirements.txt.json')
|
||||
.timeout(10000)
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: 'repo or manifest not found',
|
||||
|
||||
@@ -8,8 +8,8 @@ const {
|
||||
} = require('./snyk-test-helpers')
|
||||
|
||||
t.create('valid package latest version')
|
||||
.get('/mocha.json')
|
||||
.timeout(10000)
|
||||
.get('/commander.json')
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: Joi.number().required(),
|
||||
@@ -17,7 +17,7 @@ t.create('valid package latest version')
|
||||
|
||||
t.create('valid scoped package latest version')
|
||||
.get('/@babel/core.json')
|
||||
.timeout(10000)
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: Joi.number().required(),
|
||||
@@ -25,24 +25,23 @@ t.create('valid scoped package latest version')
|
||||
|
||||
t.create('non existent package')
|
||||
.get('/mochaabcdef.json')
|
||||
.timeout(10000)
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: 'npm package is invalid or does not exist',
|
||||
})
|
||||
|
||||
t.create('valid package specific version')
|
||||
.get('/mocha@4.0.0.json')
|
||||
.timeout(10000)
|
||||
.get('/commander@2.20.0.json')
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: '1',
|
||||
color: 'red',
|
||||
message: Joi.number().required(),
|
||||
})
|
||||
|
||||
t.create('non existent package version')
|
||||
.get('/gh-badges@0.3.4.json')
|
||||
.timeout(10000)
|
||||
.timeout(20000)
|
||||
.expectBadge({
|
||||
label: 'vulnerabilities',
|
||||
message: 'npm package is invalid or does not exist',
|
||||
|
||||
Reference in New Issue
Block a user