Commit 4c596a6b2eca0cbf7bdcfeb6d26c7eff68d1085a
1 parent
f06b513c
Add keyword "Create tender without 2 phase commit"
Showing
2 changed files
with
60 additions
and
0 deletions
... | ... | @@ -258,6 +258,43 @@ ${ERROR_PLAN_MESSAGE}= Calling method 'get_plan' failed: ResourceGone: {"status |
258 | 258 | Set To Dictionary ${TENDER} TENDER_UAID=${TENDER_UAID} |
259 | 259 | |
260 | 260 | |
261 | +Можливість оголосити тендер без 2-ї фази commit-у | |
262 | + ${file_path}= Get Variable Value ${ARTIFACT_FILE} artifact_plan.yaml | |
263 | + ${ARTIFACT}= load_data_from ${file_path} | |
264 | + Log ${ARTIFACT.tender_uaid} | |
265 | + ${NUMBER_OF_LOTS}= Convert To Integer ${NUMBER_OF_LOTS} | |
266 | + ${NUMBER_OF_ITEMS}= Convert To Integer ${NUMBER_OF_ITEMS} | |
267 | + ${NUMBER_OF_MILESTONES}= Convert To Integer ${NUMBER_OF_MILESTONES} | |
268 | + ${tender_parameters}= Create Dictionary | |
269 | + ... mode=${MODE} | |
270 | + ... number_of_items=${NUMBER_OF_ITEMS} | |
271 | + ... number_of_lots=${NUMBER_OF_LOTS} | |
272 | + ... number_of_milestones=${NUMBER_OF_MILESTONES} | |
273 | + ... tender_meat=${${TENDER_MEAT}} | |
274 | + ... lot_meat=${${LOT_MEAT}} | |
275 | + ... item_meat=${${ITEM_MEAT}} | |
276 | + ... api_host_url=${API_HOST_URL} | |
277 | + ... moz_integration=${${MOZ_INTEGRATION}} | |
278 | + ... vat_included=${${VAT_INCLUDED}} | |
279 | + ... road_index=${${ROAD_INDEX}} | |
280 | + ... gmdn_index=${${GMDN_INDEX}} | |
281 | + ... plan_tender=${${PLAN_TENDER}} | |
282 | + ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} | |
283 | + ${FUNDING_KIND}= Get Variable Value ${FUNDING_KIND} | |
284 | + Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} | |
285 | + Run keyword if '${FUNDING_KIND}' != '${None}' Set to dictionary ${tender_parameters} fundingKind=${FUNDING_KIND} | |
286 | + :FOR ${username} IN ${viewer} ${tender_owner} | |
287 | + \ ${status}= Run Keyword And Return Status List Should Contain Value ${USERS.users['${username}']} plan_client | |
288 | + \ Run Keyword If ${status} Exit For Loop | |
289 | + ${plan_data}= знайти план за ідентифікатором ${ARTIFACT.tender_uaid} ${username} | |
290 | + Log ${plan_data} | |
291 | + ${tender_data}= Підготувати дані для створення тендера ${tender_parameters} ${plan_data} | |
292 | + ${adapted_data}= Адаптувати дані для оголошення тендера ${tender_data} | |
293 | + ${TENDER_UAID}= Run As ${tender_owner} Створити тендер без 2-ї фази commit-у ${adapted_data} ${ARTIFACT.tender_uaid} | |
294 | + Set To Dictionary ${USERS.users['${tender_owner}']} initial_data=${adapted_data} | |
295 | + Set To Dictionary ${TENDER} TENDER_UAID=${TENDER_UAID} | |
296 | + | |
297 | + | |
261 | 298 | Можливість створити об'єкт моніторингу |
262 | 299 | ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers} |
263 | 300 | ${accelerator}= Get Variable Value ${accelerator} | ... | ... |
... | ... | @@ -273,6 +273,29 @@ Library openprocurement_client.utils |
273 | 273 | [return] ${tender.data.tenderID} |
274 | 274 | |
275 | 275 | |
276 | +Створити тендер без 2-ї фази commit-у | |
277 | + [Arguments] ${username} ${tender_data} ${plan_uaid} | |
278 | + ${file_path}= Get Variable Value ${ARTIFACT_FILE} artifact_plan.yaml | |
279 | + ${ARTIFACT}= load_data_from ${file_path} | |
280 | + Log ${ARTIFACT.tender_owner_access_token} | |
281 | + Log ${ARTIFACT.tender_id} | |
282 | + ${tender}= Call Method ${USERS.users['${username}'].tender_create_client} create_tender | |
283 | + ... ${ARTIFACT.tender_id} | |
284 | + ... ${tender_data} | |
285 | + ... access_token=${ARTIFACT.tender_owner_access_token} | |
286 | + Log ${tender} | |
287 | + ${access_token}= Get Variable Value ${tender.access.token} | |
288 | + ${tender_uaid}= Get Variable Value ${tender.data.tenderID} | |
289 | + ${tender_id}= Get Variable Value ${tender.data.id} | |
290 | + :FOR ${user} IN @{USED_ROLES} | |
291 | + \ Set To Dictionary ${USERS.users['${${user}}'].id_map} ${tender_uaid} ${tender_id} | |
292 | + Log ${\n}${API_HOST_URL}/api/${API_VERSION}/tenders/${tender.data.id}${\n} WARN | |
293 | + Set To Dictionary ${USERS.users['${username}']} access_token=${access_token} | |
294 | + Set To Dictionary ${USERS.users['${username}']} tender_data=${tender} | |
295 | + Log ${USERS.users['${username}'].tender_data} | |
296 | + [return] ${tender.data.tenderID} | |
297 | + | |
298 | + | |
276 | 299 | Створити об'єкт моніторингу |
277 | 300 | [Arguments] ${username} ${monitoring_data} |
278 | 301 | ${monitoring}= Call Method ${USERS.users['${username}'].dasu_client} create_monitoring ${monitoring_data} | ... | ... |
Please
register
or
login
to post a comment