-
Notifications
You must be signed in to change notification settings - Fork 26
/
conftest.py
38 lines (31 loc) · 1.31 KB
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import pytest
def pytest_addoption(parser):
parser.addoption("--adcs", action="store", default='localhost',
help="Active Directory Certificates Services server to use")
parser.addoption("--username", action="store", help="Username for auth",
default="user")
parser.addoption("--password", action="store", help="Password for auth",
default="password")
parser.addoption("--template", action="store", help="Template to use",
default="WebServer")
parser.addoption("--manual-template", action="store", help="Template with manual approval",
default="WebServer_Manual")
parser.addoption("--cafile", action="store", help="CA bundle that trusts the ADCS server")
@pytest.fixture
def opt_adcs(request):
return request.config.getoption("--adcs")
@pytest.fixture
def opt_username(request):
return request.config.getoption("--username")
@pytest.fixture
def opt_password(request):
return request.config.getoption("--password")
@pytest.fixture
def opt_template(request):
return request.config.getoption("--template")
@pytest.fixture
def opt_mantemplate(request):
return request.config.getoption("--manual-template")
@pytest.fixture
def opt_cafile(request):
return request.config.getoption("--cafile")