Skip to content

Commit 9f69984

Browse files
committed
Adding environment options
1 parent 077df5a commit 9f69984

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

seleniumbase/plugins/db_reporting_plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def options(self, parser, env):
3737
super(DBReporting, self).options(parser, env=env)
3838
parser.add_option('--database_environment', action='store',
3939
dest='database_env',
40-
choices=('prod', 'qa', 'test'),
40+
choices=('prod', 'qa', 'staging',
41+
'test', 'local', 'master'),
4142
default='test',
4243
help=SUPPRESS_HELP)
4344

seleniumbase/plugins/pytest_plugin.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ def pytest_addoption(parser):
2323
dest='with_selenium',
2424
default=False,
2525
help="Use if tests need to be run with a web browser.")
26+
parser.addoption('--env', action='store',
27+
dest='environment',
28+
choices=(
29+
constants.Environment.QA,
30+
constants.Environment.STAGING,
31+
constants.Environment.PRODUCTION,
32+
constants.Environment.MASTER,
33+
constants.Environment.LOCAL,
34+
constants.Environment.TEST),
35+
default=constants.Environment.TEST,
36+
help="The environment to run the tests in.")
2637
parser.addoption('--data', dest='data',
2738
default=None,
2839
help='Extra data to pass from the command line.')
@@ -39,7 +50,8 @@ def pytest_addoption(parser):
3950
help="Use to record test data in the MySQL database.")
4051
parser.addoption('--database_env', action='store',
4152
dest='database_env',
42-
choices=('prod', 'qa', 'test'),
53+
choices=(
54+
'prod', 'qa', 'staging', 'test', 'local', 'master'),
4355
default='test',
4456
help=optparse.SUPPRESS_HELP)
4557
parser.addoption('--with-s3_logging', action="store_true",

0 commit comments

Comments
 (0)