File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 99import subprocess
1010from typing import Any , Dict , Optional , Tuple
1111
12- _INSTANCE_DIRECTORY : str = '.instance-88888888-8888-8888-8888-888888888888'
12+ INSTANCE_DIRECTORY : str = '.instance-88888888-8888-8888-8888-888888888888'
1313
1414_COMPOSE_CONTENT : str = """---
1515version: '2.4'
@@ -118,7 +118,7 @@ def create(self) -> str:
118118 # Make the test directory...
119119 test_path = self .get_test_path ()
120120 project_path : str = self .get_test_project_path ()
121- inst_path : str = f'{ project_path } /{ _INSTANCE_DIRECTORY } '
121+ inst_path : str = f'{ project_path } /{ INSTANCE_DIRECTORY } '
122122 if not os .path .exists (inst_path ):
123123 os .makedirs (inst_path )
124124
@@ -134,7 +134,7 @@ def create(self) -> str:
134134 'command' : self ._command ,
135135 'project_directory' : self ._project_directory ,
136136 'working_directory' : self ._working_directory ,
137- 'instance_directory' : _INSTANCE_DIRECTORY }
137+ 'instance_directory' : INSTANCE_DIRECTORY }
138138 compose_content : str = _COMPOSE_CONTENT .format (** variables )
139139 compose_path : str = f'{ test_path } /docker-compose.yml'
140140 with open (compose_path , 'wt' , encoding = 'UTF-8' ) as compose_file :
Original file line number Diff line number Diff line change 1515
1616from decoder import decoder
1717
18- from .compose import get_test_root
18+ from .compose import get_test_root , INSTANCE_DIRECTORY
1919from .compose import Compose
2020
2121# Where can we expect to find Job definitions?
@@ -369,6 +369,11 @@ def _test(args: argparse.Namespace,
369369 input_files .append (value )
370370
371371 if test_status :
372+
373+ # Job variables must contain 'built-in' variables: -
374+ # - DM_INSTANCE_DIRECTORY
375+ job_variables ['DM_INSTANCE_DIRECTORY' ] = INSTANCE_DIRECTORY
376+
372377 # Get the raw (encoded) command from the job definition...
373378 raw_command : str = job_definition .command
374379 # Decode it using our variables...
You can’t perform that action at this time.
0 commit comments