From 13d1cbe0f926dabc4919755deb37e867a8abbdc7 Mon Sep 17 00:00:00 2001 From: Caleb Cartwright <calebcartwright@users.noreply.github.com> Date: Mon, 14 Oct 2019 11:13:10 -0500 Subject: [PATCH] tests: fix service test for ubuntu (#4174) --- services/ubuntu/ubuntu.tester.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/services/ubuntu/ubuntu.tester.js b/services/ubuntu/ubuntu.tester.js index a919bc3798..8b9371ec4c 100644 --- a/services/ubuntu/ubuntu.tester.js +++ b/services/ubuntu/ubuntu.tester.js @@ -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)') -- GitLab