add simple integration tests

Add simple integration tests and integrate them into the CI.
More complex tests will be added later.

Fixes: #15
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2019-09-11 11:13:02 +02:00
parent 270e07a34a
commit 07b19327a1
3 changed files with 44 additions and 4 deletions

View file

@ -1,12 +1,21 @@
SRC := ./BuildSourceImage.sh
CTR_IMAGE := localhost/containers/buildsourceimage
CTR_ENGINE ?= podman
all: validate
.PHONY: validate
validate: $(SRC)
shellcheck -a $(SRC)
shellcheck $(SRC)
.PHONY: build-container
build-container: Dockerfile
podman build -f Dockerfile -t $(CTR_IMAGE) .
@echo
@echo "Building BuildSourceImage Container"
$(CTR_ENGINE) build --quiet --file Dockerfile --tag $(CTR_IMAGE) .
.PHONY: test-integration
test-integration: build-container
@echo
@echo "Running integration tests"
CTR_IMAGE=$(CTR_IMAGE) CTR_ENGINE=$(CTR_ENGINE) bats test/