feat: download ROS bridge images from R2 and show startup progress
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { strict as assert } from 'node:assert'
|
||||
import { test } from 'node:test'
|
||||
import { bridgeArtifact, jetsonBridgeImage, localBridgeImage } from './bridgeArtifacts'
|
||||
|
||||
test('PC and Jetson bridges have separate pinned downloads', () => {
|
||||
const pc = bridgeArtifact(localBridgeImage)!
|
||||
const jetson = bridgeArtifact(jetsonBridgeImage)!
|
||||
assert.equal(pc.architecture, 'amd64')
|
||||
assert.equal(jetson.architecture, 'arm64')
|
||||
assert.notEqual(pc.url, jetson.url)
|
||||
assert.notEqual(pc.fileName, jetson.fileName)
|
||||
for (const artifact of [pc, jetson]) {
|
||||
assert.match(artifact.checksumSha256, /^[a-f0-9]{64}$/)
|
||||
assert.equal(new URL(artifact.url).protocol, 'https:')
|
||||
assert.ok(artifact.url.includes(artifact.checksumSha256.slice(0, 12)))
|
||||
assert.equal(artifact.required, true)
|
||||
}
|
||||
})
|
||||
|
||||
test('custom images do not resolve to an unrelated built-in artifact', () => {
|
||||
assert.equal(bridgeArtifact('custom-bridge:test'), undefined)
|
||||
})
|
||||
Reference in New Issue
Block a user