tests: fix service test for ubuntu (#4174)
This commit is contained in:
committed by
Marcin Mielnicki
parent
b8d0ec4238
commit
13d1cbe0f9
@@ -1,15 +1,17 @@
|
||||
'use strict'
|
||||
|
||||
const {
|
||||
isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch,
|
||||
} = require('../test-validators')
|
||||
const Joi = require('@hapi/joi')
|
||||
const t = (module.exports = require('../tester').createServiceTester())
|
||||
|
||||
const isUbuntuVersion = Joi.string().regex(
|
||||
/^v(\d+:)?\d+(\.\d+)*([\w\\.]*)?([-+~].*)?$/
|
||||
)
|
||||
|
||||
t.create('Ubuntu package (default distribution, valid)')
|
||||
.get('/apt.json')
|
||||
.expectBadge({
|
||||
label: 'ubuntu',
|
||||
message: isVPlusDottedVersionNClausesWithOptionalSuffixAndEpoch,
|
||||
message: isUbuntuVersion,
|
||||
})
|
||||
|
||||
t.create('Ubuntu package (valid)')
|
||||
|
||||
Reference in New Issue
Block a user