[DRE-commits] [ruby-grack] 07/10: debian/tests: add smoke test to clone and push a repository
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri Sep 4 14:41:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-grack.
commit 556dae70a6157cd39dac4da8422825308bb05f6a
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Sep 4 11:26:43 2015 -0300
debian/tests: add smoke test to clone and push a repository
---
debian/changelog | 1 +
debian/control | 4 ++--
debian/tests/control | 1 +
debian/tests/smoke-test | 45 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f33083c..b0919c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ ruby-grack (2.0.2-1) UNRELEASED; urgency=medium
* Add myself to Uploaders:
* Added patch:
0001-gemspec-don-t-relly-on-git-and-relax-rack-dependency.patch
+ * debian/tests: add smoke test to clone and push a repository
-- Antonio Terceiro <terceiro at debian.org> Fri, 04 Sep 2015 10:55:19 -0300
diff --git a/debian/control b/debian/control
index ca09aff..5b67a9c 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Standards-Version: 3.9.6
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-grack.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-grack.git
Homepage: https://github.com/gitlabhq/grack
-Testsuite: autopkgtest-pkg-ruby
+Testsuite: autopkgtest
XS-Ruby-Versions: all
Package: ruby-grack
@@ -33,4 +33,4 @@ Description: Git Smart HTTP Server Rack implementation in Ruby/Rack
application can run on nearly every major and minor webserver out
there by making it Rack capable.
.
- This the GITLAB version of the library.
\ No newline at end of file
+ This the GITLAB version of the library.
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..a3fd5fa
--- /dev/null
+++ b/debian/tests/smoke-test
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+exec 2>&1
+set -ex
+
+tmpdir="$ADTTMP"
+if [ -x "$tmpdir" ]; then
+ tmpdir=$(mktemp -d)
+ remove_tmpdir() {
+ rm -rf "$tmpdir"
+ }
+ trap remove_tmpdir INT TERM EXIT
+fi
+
+cd $tmpdir
+
+mkdir -p repos/test.git
+git init --bare repos/test.git
+
+cat > config.ru <<EOF
+require 'grack'
+config = {
+ :project_root => File.join(File.dirname(__FILE__), 'repos'),
+ :upload_pack => true,
+ :receive_pack => true,
+}
+run Grack::Server.new(config)
+EOF
+
+rackup -p 6666 &
+server=$!
+stop_server() {
+ kill $server
+}
+trap stop_server INT TERM EXIT
+
+sleep 2 # wait for the server to get up
+
+git clone http://localhost:6666/test.git
+cd test
+touch README
+git add README
+git commit -m 'Initial commit'
+git push
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-grack.git
More information about the Pkg-ruby-extras-commits
mailing list