Add unit tests
Change-Id: Id16d6b1d9779bf5b40d37e8ab5e761ff5448db4b
diff --git a/Makefile b/Makefile
index d166862..3af6b3d 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@
@echo "make release-major - Generate new major release"
@echo "make release-minor - Generate new minor release"
@echo "make changelog - Show changes since last release"
+ @echo "make test-model-validate - Run salt jsonschema validation"
install:
# Formula
@@ -41,6 +42,7 @@
cp -a $(FORMULANAME) $(DESTDIR)/$(SALTENVDIR)/
[ ! -d _modules ] || cp -a _modules $(DESTDIR)/$(SALTENVDIR)/
[ ! -d _states ] || cp -a _states $(DESTDIR)/$(SALTENVDIR)/ || true
+ [ ! -d _engines ] || cp -a _engines $(DESTDIR)/$(SALTENVDIR)/ || true
[ ! -d _grains ] || cp -a _grains $(DESTDIR)/$(SALTENVDIR)/ || true
# Metadata
[ -d $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME) ] || mkdir -p $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
@@ -52,6 +54,10 @@
test:
[ ! -d tests ] || (cd tests; ./run_tests.sh)
+test-model-validate:
+ # TODO make it actually fail
+ [ ! -d $(FORMULANAME)/schemas/ ] || (cd tests; ./run_tests.sh model-validate)
+
release-major: check-changes
@echo "Current version is $(VERSION), new version is $(NEW_MAJOR_VERSION)"
@[ $(VERSION_MAJOR) != $(NEW_MAJOR_VERSION) ] || (echo "Major version $(NEW_MAJOR_VERSION) already released, nothing to do. Do you want release-minor?" && exit 1)
@@ -119,4 +125,4 @@
[ ! -x "$(shell which kitchen)" ] || kitchen destroy
[ ! -d .kitchen ] || rm -rf .kitchen
[ ! -d tests/build ] || rm -rf tests/build
- [ ! -d build ] || rm -rf build
+ [ ! -d build ] || rm -rf build
\ No newline at end of file