Each e2e scenario can provide its own config name
This commit is contained in:
@@ -128,13 +128,14 @@ class Scenario:
|
|||||||
etc
|
etc
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, name, steps):
|
def __init__(self, name, steps, conf="basic"):
|
||||||
"""
|
"""
|
||||||
Steps is a list of 2-tuple:
|
Steps is a list of 2-tuple:
|
||||||
[(action, answer), (action, answer)]
|
[(action, answer), (action, answer)]
|
||||||
"""
|
"""
|
||||||
self.name = name
|
self.name = name
|
||||||
self.steps = []
|
self.steps = []
|
||||||
|
self.conf = conf
|
||||||
for elem in steps:
|
for elem in steps:
|
||||||
if isinstance(elem, collections.Iterable):
|
if isinstance(elem, collections.Iterable):
|
||||||
for step in elem:
|
for step in elem:
|
||||||
@@ -226,7 +227,7 @@ class BiboumiTest:
|
|||||||
filename=output_filename)
|
filename=output_filename)
|
||||||
|
|
||||||
with open("test.conf", "w") as fd:
|
with open("test.conf", "w") as fd:
|
||||||
fd.write(confs['basic'])
|
fd.write(confs[scenario.conf])
|
||||||
|
|
||||||
# Start the XMPP component and biboumi
|
# Start the XMPP component and biboumi
|
||||||
biboumi = BiboumiRunner(scenario.name, with_valgrind)
|
biboumi = BiboumiRunner(scenario.name, with_valgrind)
|
||||||
@@ -254,7 +255,8 @@ class BiboumiTest:
|
|||||||
return not failed
|
return not failed
|
||||||
|
|
||||||
|
|
||||||
confs = {'basic':
|
confs = {
|
||||||
|
'basic':
|
||||||
"""hostname=biboumi.localhost
|
"""hostname=biboumi.localhost
|
||||||
password=coucou
|
password=coucou
|
||||||
db_name=biboumi.sqlite
|
db_name=biboumi.sqlite
|
||||||
|
|||||||
Reference in New Issue
Block a user