Add check for correct image names
Change-Id: Ib83c811a3ef9f3ab1b2f3f58d77fb2c76ebb69f9
This commit is contained in:
parent
1aec8321c2
commit
1daf1a5418
13
test.py
13
test.py
@ -1,6 +1,19 @@
|
|||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
LOG = logging.getLogger("openstack-planet")
|
||||||
|
|
||||||
cp = ConfigParser.ConfigParser()
|
cp = ConfigParser.ConfigParser()
|
||||||
cp.read("planet.ini")
|
cp.read("planet.ini")
|
||||||
|
|
||||||
assert cp.get('Planet', 'output_dir') == '/srv/planet/openstack'
|
assert cp.get('Planet', 'output_dir') == '/srv/planet/openstack'
|
||||||
|
|
||||||
|
for i in cp.sections():
|
||||||
|
try:
|
||||||
|
assert os.path.isfile(os.path.join('images', cp.get(i, 'face')))
|
||||||
|
except ConfigParser.NoOptionError:
|
||||||
|
pass
|
||||||
|
except AssertionError:
|
||||||
|
raise IOError('Image not correct for %s' % i)
|
||||||
|
Loading…
Reference in New Issue
Block a user