File: status.bats

package info (click to toggle)
golang-github-containers-storage 1.50.2%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,032 kB
  • sloc: sh: 641; ansic: 388; makefile: 140; awk: 12
file content (18 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bats

load helpers

@test "status" {
	run storage --debug=false status
	echo :"$output":
	[ "$status" -eq 0 ]
	# Expect the first line of the output to be the storage root directory location.
	[ "${lines[0]/:*/}" = "Root" ]
	[ "${lines[0]/*: /}" = "${TESTDIR}/root" ]
	# Expect the second line of the output to be the storage runroot directory location.
	[ "${lines[1]/:*/}" = "Run Root" ]
	[ "${lines[1]/*: /}" = "${TESTDIR}/runroot" ]
	# Expect the third line of the output to be "Driver Name: $STORAGE_DRIVER".
	[ "${lines[2]/:*/}" = "Driver Name" ]
	[ "${lines[2]/*: /}" = "$STORAGE_DRIVER" ]
}