Files
shields/services/ros/ros-version.tester.js
Jacob Bandes-Storch 84829853b9 Fix variable naming for [ROS] version service (#8292)
* Fix variable naming for [ROS] version service

* Add documentation

* use noetic instead of galactic in example

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-09 19:49:52 +00:00

29 lines
888 B
JavaScript

import { isSemver } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the version of vision_msgs in active distro')
.get('/humble/vision_msgs.json')
.expectBadge({ label: 'ros | humble', message: isSemver })
t.create('gets the version of vision_msgs in EOL distro')
.get('/lunar/vision_msgs.json')
.expectBadge({ label: 'ros | lunar', message: isSemver })
t.create('returns not found for invalid repo')
.get('/humble/this repo does not exist - ros test.json')
.expectBadge({
label: 'ros',
color: 'red',
message: 'repo not found: this repo does not exist - ros test',
})
t.create('returns error for invalid distro')
.get('/xxxxxx/vision_msgs.json')
.expectBadge({
label: 'ros',
color: 'red',
message: 'distribution.yaml not found: xxxxxx@master',
})