[DRE-commits] [redmine] 03/08: use actual documentation to setup smoke tests

Antonio Terceiro terceiro at moszumanska.debian.org
Tue Sep 30 21:39:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository redmine.

commit 4d0f52c8e2f78ecdc78e06884a5ce38ab189dbc6
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sun Sep 21 12:10:02 2014 -0300

    use actual documentation to setup smoke tests
---
 debian/tests/smoke-test | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/debian/tests/smoke-test b/debian/tests/smoke-test
index 7f1b94f..cb41455 100755
--- a/debian/tests/smoke-test
+++ b/debian/tests/smoke-test
@@ -1,30 +1,26 @@
 #!/bin/sh
 
 dbadapter="${1:-sqlite3}"
+webserver="${2:-apache2-passenger}"
 
 exec 2>&1
-set -ex
+set -eux
 
 grep "adapter:[[:space:]]*$dbadapter" /etc/redmine/default/database.yml
 
-tee /etc/apache2/sites-enabled/redmine.conf <<EOF
-<VirtualHost *:80>
-  ServerName localhost
-  RailsEnv production
-  SetEnv X_DEBIAN_SITEID "default"
-  PassengerDefaultUser www-data
-  Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/
-  DocumentRoot /usr/share/redmine/public
-  <Directory "/usr/share/redmine/public">
-    Allow from all
-    Options -MultiViews
-    Require all granted
-  </Directory>
-  ErrorLog /var/log/apache2/redmine.error.log
-  CustomLog \${APACHE_LOG_DIR}/redmine.access.log vhost_combined
-</VirtualHost>
-EOF
+setup_apache2() {
+  sed -e '/<VirtualHost/ a ServerName localhost' /usr/share/doc/redmine/examples/$webserver-host.conf > /etc/apache2/sites-enabled/redmine.conf
+  service apache2 restart
+}
 
-service apache2 restart
+case "$webserver" in
+  apache2*)
+    setup_apache2
+    ;;
+  *)
+    set +x
+    echo "Testing under $webserver not supported yet"
+    exit 1
+esac
 
 curl -s http://localhost/ | grep 'meta.*name="description".*content="Redmine"'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git



More information about the Pkg-ruby-extras-commits mailing list