File: test_dirinstall.bats

package info (click to toggle)
grml-debootstrap 0.123
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 464 kB
  • sloc: sh: 2,562; python: 165; makefile: 72; ansic: 49
file content (24 lines) | stat: -rw-r--r-- 570 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bats

mountpoint="/srv/debian"

@test "ensure no grub configuration is present" {
  run ls "${mountpoint}"/boot/grub/grub.cfg
  [ "$status" -ne 0 ]
}

@test "kernel is absent" {
  run ls "${mountpoint}"/boot/vmlinuz-*
  [ "$status" -ne 0 ]
}

@test "ensure eatmydata package is present" {
  run chroot "${mountpath}" dpkg --list eatmydata
  [ "$status" -eq 0 ]
}

@test "debian_version exists and is valid version" {
  run cat "${mountpoint}/etc/debian_version"
  [ "$status" -eq 0 ]
  [[ "$output" == [0-9].[0-9]* ]] || [[ "$output" == 'trixie/sid' ]]
}