File tree 2 files changed +16
-3
lines changed
services/web/server/tests/login
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 42
42
password : None
43
43
rest :
44
44
version : v0
45
- location : ../../../.. /api/specs/webserver/v0/openapi.yaml
45
+ location : ${OSPARC_SIMCORE_REPO_ROOTDIR} /api/specs/webserver/v0/openapi.yaml
Original file line number Diff line number Diff line change 25
25
def here ():
26
26
return Path (sys .argv [0 ] if __name__ == "__main__" else __file__ ).resolve ().parent
27
27
28
+
29
+ @pytest .fixture (scope = 'session' )
30
+ def osparc_simcore_root_dir (here ):
31
+ root_dir = here .parent .parent .parent .parent .parent .resolve ()
32
+ assert root_dir .exists (), "Is this service within osparc-simcore repo?"
33
+ assert any (root_dir .glob ("services/web/server" )), "%s not look like rootdir" % root_dir
34
+ return root_dir
35
+
28
36
@pytest .fixture (scope = "session" )
29
- def app_cfg (here ):
37
+ def app_cfg (here , osparc_simcore_root_dir ):
30
38
cfg_path = here / "config.yaml"
31
39
assert cfg_path .exists ()
32
40
41
+ variables = dict (os .environ )
42
+ variables .update ({
43
+ 'OSPARC_SIMCORE_REPO_ROOTDIR' : str (osparc_simcore_root_dir ),
44
+ })
45
+
33
46
# validates and fills all defaults/optional entries that normal load would not do
34
- cfg_dict = trafaret_config .read_and_validate (cfg_path , CONFIG_SCHEMA )
47
+ cfg_dict = trafaret_config .read_and_validate (cfg_path , CONFIG_SCHEMA , vars = variables )
35
48
return cfg_dict
36
49
37
50
@pytest .fixture (scope = 'session' )
You can’t perform that action at this time.
0 commit comments