aboutsummaryrefslogtreecommitdiffstats
path: root/test/04-rebuild.test
diff options
context:
space:
mode:
authorWolfgang Müller2021-03-10 17:09:13 +0100
committerWolfgang Müller2021-03-10 17:09:13 +0100
commit3bce19d12d93f1b27e7d2f2acbef0926417d5390 (patch)
tree3700afd21af95a0904be6aaf3378fc75e3955b10 /test/04-rebuild.test
parent1d767c0bdd6476a4ba9a998b8953ec8b9ad9f21c (diff)
downloadbosun-3bce19d12d93f1b27e7d2f2acbef0926417d5390.tar.gz
Add a first draft of the test suite1.3.0
The introduction of a test suite makes future changes easier to troubleshoot and verify. Whilst this is only a first draft, it should be stable enough to be used in normal development and should cover the entirety of bosun's functionality.
Diffstat (limited to '')
-rw-r--r--test/04-rebuild.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/04-rebuild.test b/test/04-rebuild.test
new file mode 100644
index 0000000..503afc4
--- /dev/null
+++ b/test/04-rebuild.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+header "bosun rebuild"
+
+mkdir "$BOSUN_DIR/app-foo/package.accept_keywords" || exit 1
+touch "$BOSUN_DIR/app-foo/package.accept_keywords/30-app-foo" || exit 1
+
+assert success "rebuild app-foo" "$BOSUN_CMD" rebuild app-foo
+
+want <<EOF
+./package.accept_keywords/20-service-bar -> ../stow/service-bar/package.accept_keywords/20-service-bar
+./package.accept_keywords/30-app-foo -> ../stow/app-foo/package.accept_keywords/30-app-foo
+./package.use/20-service-bar -> ../stow/service-bar/package.use/20-service-bar
+./package.use/30-app-foo -> ../stow/app-foo/package.use/30-app-foo
+EOF
+
+have_links
+
+assert_output_matches "rebuilds role"
+
+end