snap-neutron/tests/snapstack_test.py
Pete Vander Giessen d3b2962303 Added config files to snapstack_test.
This helps us not break when transitioning to using the new version of
snapstack, with the config files for each snap in the individual
steps, rather than in a config step.

Change-Id: Ia69fba6d0ed8d1fc47bcabfea817f263dbd4d66d
2017-08-11 20:29:20 +00:00

32 lines
996 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 neutron. Override the 'neutron'
# step with a locally built snap. keystone, nova, etc. will still
# be installed as normal from the store.
setup = Setup()
setup.add_steps(('neutron', Step(
snap='neutron',
script_loc='./tests/',
scripts=['neutron.sh'],
files=[
'etc/snap-neutron/neutron/neutron.conf.d/database.conf',
'etc/snap-neutron/neutron/neutron.conf.d/nova.conf',
'etc/snap-neutron/neutron/neutron.conf.d/keystone.conf',
],
snap_store=False)))
# Execute the snapstack tests
plan = Plan(base_setup=setup.steps())
plan.run()