[DRE-commits] [ruby-foreman] 15/15: debian/tests: add a simple smoke test

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Feb 4 17:29:51 UTC 2015


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

terceiro pushed a commit to branch master
in repository ruby-foreman.

commit 10be6464ff5ace9505ce23e8354144e86d453850
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Wed Feb 4 15:11:18 2015 -0200

    debian/tests: add a simple smoke test
    
    The test suite runs just fine during build, but I couldn't make it work
    under autopkgtest yet. The package works just fine, though.
---
 debian/control          |  2 +-
 debian/tests/control    |  1 +
 debian/tests/smoke-test | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 4cad102..826b528 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Standards-Version: 3.9.6
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-foreman.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-foreman.git;a=summary
 Homepage: http://github.com/ddollar/foreman
-Testsuite: autopkgtest-ruby
+Testsuite: autopkgtest
 XS-Ruby-Versions: all
 
 Package: ruby-foreman
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..c1b56cd
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1 @@
+Tests: smoke-test
diff --git a/debian/tests/smoke-test b/debian/tests/smoke-test
new file mode 100755
index 0000000..62fa669
--- /dev/null
+++ b/debian/tests/smoke-test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+exec 2>&1
+set -ex
+
+cd $ADTTMP
+
+mkdir app
+cd app
+
+cat > Procfile <<EOF
+worker: sleep 1h
+EOF
+
+foreman version
+foreman check
+foreman export systemd etc/systemd/system
+foreman start &
+pid=$!
+
+sleep 5s
+pgrep -fa 'sleep 1h'
+
+kill $pid
+
+sleep 5s
+! pgrep -fa 'sleep 1h'

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



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