Added automated testing via tox and zuul.

We're cheating a little bit and re-using the
openstack-tox-snap-with-sudo template, even though this isn't strictly
speaking a python project.

Currently, we simply build the snap and run tests/basic-test.sh.

In the long run, we will put together a more comprehensive suite of
functional tests.

Change-Id: I968116dd7bec412a55813c896d60cfc86c7070db
This commit is contained in:
Pete Vander Giessen 2019-07-17 20:11:28 +00:00 committed by James Page
parent 96c94f0cf5
commit 6a7dd707f1
4 changed files with 32 additions and 0 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.opendev.org
port=29418
project=x/microstack.git

3
.zuul.yaml Normal file
View File

@ -0,0 +1,3 @@
- project:
templates:
- snap-jobs

1
test-requirements.txt Normal file
View File

@ -0,0 +1 @@
petname

24
tox.ini Normal file
View File

@ -0,0 +1,24 @@
[tox]
envlist = snap
skipsdist = True
[testenv]
install_command = pip install {opts} {packages}
setenv =
PATH = {env:PATH}:/snap/bin
passenv = HOME TERM
whitelist_externals =
sudo
snapcraft
[testenv:snap]
deps = -r{toxinidir}/test-requirements.txt
commands =
sudo apt update
sudo apt install -y snapd
sudo snap install core18
sudo snap install --beta --classic multipass
sudo snap install --classic snapcraft
snapcraft clean
snapcraft snap
{toxinidir}/tests/basic-test.sh