summaryrefslogtreecommitdiff
path: root/tests/functional/features/steps/bitmask.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-16 11:28:21 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:46 -0400
commit6cb13e80a5e0ea1ab614d51e7ed831d6ec251306 (patch)
treed7bf94376370d35d04d9d6be01cbd17a62ac6d1c /tests/functional/features/steps/bitmask.py
parente074c4bd23f4386519dae02d5687270ba294f636 (diff)
[tests] prepare to run behave against bundle
Diffstat (limited to 'tests/functional/features/steps/bitmask.py')
-rw-r--r--tests/functional/features/steps/bitmask.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/functional/features/steps/bitmask.py b/tests/functional/features/steps/bitmask.py
index d9f90578..7e1201f6 100644
--- a/tests/functional/features/steps/bitmask.py
+++ b/tests/functional/features/steps/bitmask.py
@@ -9,11 +9,15 @@ from behave import given
@given('I start bitmask for the first time')
def initial_run(context):
- commands.getoutput('bitmaskctl stop')
- # TODO: fix bitmaskctl to only exit once bitmaskd has stopped
- time.sleep(2)
- _initialize_home_path()
- commands.getoutput('bitmaskctl start')
+ if context.mode == 'virtualenv':
+ commands.getoutput('bitmaskctl stop')
+ # TODO: fix bitmaskctl to only exit once bitmaskd has stopped
+ time.sleep(2)
+ _initialize_home_path()
+ commands.getoutput('bitmaskctl start')
+ elif context.mode in ('bundle', 'bundle-ci'):
+ commands.getoutput(context.bundle_path)
+ time.sleep(2)
tokenpath = os.path.join(get_path_prefix(), 'leap', 'authtoken')
token = open(tokenpath).read().strip()
context.login_url = "http://localhost:7070/#%s" % token