test: add helpers.bash to reduce boilerplate

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2019-09-19 11:57:02 +02:00
parent b77abbafa3
commit 66ac3195c8
3 changed files with 17 additions and 4 deletions

View file

@ -1,8 +1,10 @@
#!/usr/bin/env bats -t
load helpers
@test "build from RPMS" {
d=$(mktemp -d)
run $CTR_ENGINE run --rm -v $(pwd)/.testprep/srpms/:/src:ro -v ${d}:/output/ $CTR_IMAGE -s /src
run_ctr -v $(pwd)/.testprep/srpms/:/src:ro -v ${d}:/output/ $CTR_IMAGE -s /src
[ "$status" -eq 0 ]
#echo ${lines[@]}
[[ ${lines[0]} =~ "[SrcImg][INFO] calling source collection drivers" ]]