Skip to content

Commit 4342c1a

Browse files
author
Bernard Szabo
committed
feat: postman tested regex changes
1 parent b6cf1b1 commit 4342c1a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tubular/scripts/dd_synthetic_tests.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _trigger_batch_tests(self):
134134
x = "(\w+)\.edx.org|1.stage.edx.org"
135135
json_request_body = {"tests": [{"public_id": test.public_id,
136136
"startUrl" : test.start_url,
137-
"resourceUrlSubstitutionRegexes": self._map_environment_resources(test.env)
137+
"resourceUrlSubstitutionRegexes": [self._map_environment_resources(test.env)]
138138
}
139139
for test in self.tests_by_public_id.values()]}
140140
logging.info(f'Trigger request body: {json_request_body}')
@@ -146,8 +146,7 @@ def _trigger_batch_tests(self):
146146
def _map_environment_resources(self, env):
147147
if not env or env == 'prod' or env == 'stage':
148148
logging.info("***** Relying on identity transformation for environment resources ***** ")
149-
return [{'pattern': '(?P<identity>.*)',
150-
'substitution': '{{identity}}'}] # No change
149+
return '(?P<identity>.*)|{{identity}}' # No change
151150
elif env == 'stage':
152151
return r'"(.+)\.edx.org|$1.stage.edx.org"'
153152
else:

0 commit comments

Comments
 (0)