snap-nova-hypervisor/tests/snapstack_test.py
Pete Vander Giessen 8f43785d63 Added snapstack test.
Tweaked tox.ini to invoke snapstack, and added test_snapstack.py to
tests dir.

Also added nova-hypervisor.sh to nova-hypervisor/tests, as part of the
plan to move those scripts from snap-test to the individual snaps.

Change-Id: I2e0363d361893a899b6cd4e4683e6d14bac1a0ed
2017-07-27 19:00:16 +00:00

27 lines
789 B
Python

import unittest
from snapstack import Plan, Setup, Step
class SnapstackTest(unittest.TestCase):
def test_snapstack(self):
'''
_test_snapstack_
Run a basic smoke test, utilizing our snapstack testing harness.
'''
# snapstack already installs nova-hypervisor. Override the
# 'nova-hypervisor' step with a locally built snap. neutron,
# keystone, etc. will still be installed as normal from the store.
setup = Setup()
setup.add_steps(('nova_hypervisor', Step(
snap='nova-hypervisor',
script_loc='./tests/',
scripts=['nova-hypervisor.sh'],
snap_store=False)))
# Execute the snapstack tests
plan = Plan(base_setup=setup.steps())
plan.run()