[DRE-commits] [vagrant-lxc] 01/06: debian/tests/: add simple smoke test

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Apr 11 17:50:59 UTC 2016


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

terceiro pushed a commit to branch master
in repository vagrant-lxc.

commit ca849df13810f8e144a0faf2c9340cef72a43685
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Mon Apr 11 14:01:16 2016 -0300

    debian/tests/: add simple smoke test
---
 debian/changelog     |  6 ++++++
 debian/tests/basics  | 30 ++++++++++++++++++++++++++++++
 debian/tests/control |  3 +++
 3 files changed, 39 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 318a41e..5f52ab8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vagrant-lxc (1.2.1-3) UNRELEASED; urgency=medium
+
+  * debian/tests/: add simple smoke test
+
+ -- Antonio Terceiro <terceiro at debian.org>  Mon, 11 Apr 2016 14:00:50 -0300
+
 vagrant-lxc (1.2.1-2) unstable; urgency=medium
 
   * 0002-Fix-shebang-in-sudoers-template.patch: actually fix script shebang
diff --git a/debian/tests/basics b/debian/tests/basics
new file mode 100755
index 0000000..bc103f4
--- /dev/null
+++ b/debian/tests/basics
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+exec 2>&1
+set -exu
+
+export VAGRANT_DEFAULT_PROVIDER=lxc
+
+if [ -z "$ADTTMP" ]; then
+  ADTTMP=$(mktemp -d)
+  trap "rm -rf $ADTTMP" INT TERM EXIT
+fi
+
+echo USE_LXC_BRIDGE=true > /etc/default/lxc-net
+systemctl restart lxc-net
+cat > /etc/lxc/default.conf <<EOF
+lxc.network.type = veth
+lxc.network.flags = up
+lxc.network.link = lxcbr0
+EOF
+
+if ! (vagrant box list | grep debian/jessie64); then
+  vagrant box add --force --provider=$VAGRANT_DEFAULT_PROVIDER debian/jessie64
+fi
+
+cd $ADTTMP
+vagrant init debian/jessie64
+vagrant up
+vagrant ssh -- uname -a
+vagrant halt
+vagrant destroy --force
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..6296df8
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: basics
+Depends: vagrant, @
+Restrictions: needs-root, needs-recommends, breaks-testbed, isolation-machine

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



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