Files
jNullj 1350df70b8 fix [bugzilla] live test case to use new custom base url (#11526)
* fix [bugzilla] live test case to use new custom base url

ecplise seems to be in archive mode and may not work anymore in the future.
this commit fixes live tests failed in our daily tests.

* Update example for baseUrl and bugNumber

eclipse bugzilla is in archive mode, we switched live tests to gnu's gcc.
update the baseUrl example as well as the example bug number to fit both default baseUrl and the new example
2025-11-27 05:40:53 +02:00

32 lines
714 B
JavaScript

import Joi from 'joi'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const bzBugStatus = Joi.equal(
'unconfirmed',
'new',
'assigned',
'fixed',
'invalid',
"won't fix",
'duplicate',
'works for me',
'incomplete',
)
t.create('Bugzilla valid bug status').get('/996038.json').expectBadge({
label: 'bug 996038',
message: bzBugStatus,
})
t.create('Bugzilla valid bug status with custom baseUrl')
.get('/12345.json?baseUrl=https://gcc.gnu.org/bugzilla')
.expectBadge({
label: 'bug 12345',
message: bzBugStatus,
})
t.create('Bugzilla invalid bug status')
.get('/001.json')
.expectBadge({ label: 'bugzilla', message: 'not found' })