tests: use bats for integration tests

Converted the CLI tests to using bats to get started

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-04-14 14:47:46 -07:00
parent 3bc91530e0
commit e7458e9ca2
9 changed files with 195 additions and 218 deletions

View File

@@ -27,8 +27,12 @@ cuefmt:
cuelint: cuefmt
@test -z "$$(git status -s . | grep -e "^ M" | grep .cue | cut -d ' ' -f3 | tee /dev/stderr)"
.PHONY: shellcheck
shellcheck:
shellcheck ./tests/*.bats ./tests/*.bash
.PHONY: lint
lint: cuelint golint check-buildkit-version
lint: shellcheck cuelint golint check-buildkit-version
.PHONY: check-buildkit-version
check-buildkit-version:
@@ -41,7 +45,10 @@ check-buildkit-version:
integration: dagger-debug
# Self-diagnostics
./tests/test-test.sh 2>/dev/null
# Actual integration tests
# Bats based integration tests
yarn --cwd "./tests" install
DAGGER_BINARY="../cmd/dagger/dagger-debug" yarn --cwd "./tests" test
# Old style integration tests tests
DAGGER_BINARY="./cmd/dagger/dagger-debug" time ./tests/test.sh all
.PHONY: install