-
Notifications
You must be signed in to change notification settings - Fork 930
Expand file tree
/
Copy pathaptInstall.test.ts
More file actions
33 lines (29 loc) · 910 Bytes
/
aptInstall.test.ts
File metadata and controls
33 lines (29 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Template } from '../../../src'
import { buildTemplateTest } from '../../setup'
buildTemplateTest('apt install', async ({ buildTemplate }) => {
try {
const template = Template()
.fromImage('ubuntu:24.04')
.skipCache()
.aptInstall('rolldice')
await buildTemplate(template)
} catch (error) {
// aptInstall tests are optional and allowed to fail
console.warn('aptInstall test failed (optional):', error)
}
})
buildTemplateTest(
'apt install with no install recommends',
async ({ buildTemplate }) => {
try {
const template = Template()
.fromImage('ubuntu:24.04')
.skipCache()
.aptInstall('rolldice', { noInstallRecommends: true })
await buildTemplate(template)
} catch (error) {
// aptInstall tests are optional and allowed to fail
console.warn('aptInstall test failed (optional):', error)
}
}
)