File: info.bats

package info (click to toggle)
golang-github-containers-buildah 1.39.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,724 kB
  • sloc: sh: 2,398; makefile: 236; perl: 187; asm: 16; awk: 12; ansic: 1
file content (29 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bats

load helpers

@test "info" {
  run_buildah info
  expect_output --substring "host"

  run_buildah info --format='{{.store}}'
  # All of the following keys must be present in results. Order
  # isn't guaranteed, nor is their value, but they must all exist.
  for key in ContainerStore GraphDriverName GraphRoot RunRoot;do
    expect_output --substring "map.*$key:"
  done
}

@test "logging levels" {
  # check that these logging levels are recognized
  run_buildah --log-level=trace info
  run_buildah --log-level=debug info
  run_buildah --log-level=warn  info
  run_buildah --log-level=info  info
  run_buildah --log-level=error info
  run_buildah --log-level=fatal info
  run_buildah --log-level=panic info
  # check that we reject bogus logging levels
  run_buildah 125 --log-level=telepathic info
  expect_output --substring "unable to parse log level: not a valid logrus Level"
}