Add test for plugins.sh execution
diff --git a/tests/plugins/Dockerfile b/tests/plugins/Dockerfile
new file mode 100644
index 0000000..c88c631
--- /dev/null
+++ b/tests/plugins/Dockerfile
@@ -0,0 +1,4 @@
+FROM bats-jenkins
+
+COPY plugins.txt /usr/share/jenkins/ref/
+RUN /usr/local/bin/plugins.sh /usr/share/jenkins/ref/plugins.txt
diff --git a/tests/plugins/plugins.txt b/tests/plugins/plugins.txt
new file mode 100644
index 0000000..712d603
--- /dev/null
+++ b/tests/plugins/plugins.txt
@@ -0,0 +1 @@
+maven-plugin:2.7.1
diff --git a/tests/tests.bats b/tests/tests.bats
index bc42afc..cddd57f 100644
--- a/tests/tests.bats
+++ b/tests/tests.bats
@@ -51,6 +51,10 @@
bash -c "curl -fsSL $(get_jenkins_url)/systemInfo | sed 's/<\/tr>/<\/tr>\'$'\n/g' | grep '<td class=\"pane\">user.timezone</td>' | sed -e '${sed_expr}'"
}
+@test "Derived image with plugins.txt" {
+ docker build -t $SUT_IMAGE-plugins $BATS_TEST_DIRNAME/plugins
+}
+
@test "clean test containers" {
cleanup $SUT_CONTAINER
}