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:
parent
270e07a34a
commit
07b19327a1
3 changed files with 44 additions and 4 deletions
13
Makefile
13
Makefile
|
@ -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/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue