Commit 9d2f1055a61977a1c1b0e4e84a92e670a4d9db2d
1 parent
5a1c1faa
Adapt keywords.robot to support new brokers.yaml
Showing
1 changed file
with
13 additions
and
10 deletions
... | ... | @@ -44,8 +44,9 @@ Set Suite Variable With Default Value |
44 | 44 | \ log ${active_users} |
45 | 45 | \ log ${username} |
46 | 46 | \ ${status}= Run Keyword And Return Status Dictionary Should Contain Value ${active_users} ${username} |
47 | - \ Run Keyword If '${status}' == 'True' Завантажуємо бібліотеку з реалізацією ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file} майданчики | |
48 | - \ Run Keyword If '${status}' == 'True' Викликати для учасника ${username} Підготувати клієнт для користувача | |
47 | + \ ${keywords_file}= Get Broker Property By Username ${username} keywords_file | |
48 | + \ Run Keyword If '${status}' == 'True' Завантажуємо бібліотеку з реалізацією ${keywords_file} майданчики | |
49 | + \ Run Keyword If '${status}' == 'True' Викликати для учасника ${username} Підготувати клієнт для користувача | |
49 | 50 | |
50 | 51 | Get Broker Property |
51 | 52 | [Arguments] ${broker_name} ${property} |
... | ... | @@ -85,7 +86,8 @@ Get Broker Property By Username |
85 | 86 | ${reply}= test_complaint_reply_data |
86 | 87 | Append to list ${REPLIES} ${reply} |
87 | 88 | Set Global Variable ${REPLIES} |
88 | - ${INITIAL_TENDER_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} ${mode} | |
89 | + ${period_interval}= Get Broker Property By Username ${tender_owner} period_interval | |
90 | + ${INITIAL_TENDER_DATA}= prepare_test_tender_data ${period_interval} ${mode} | |
89 | 91 | Set Global Variable ${INITIAL_TENDER_DATA} |
90 | 92 | ${TENDER}= Create Dictionary |
91 | 93 | Set Global Variable ${TENDER} |
... | ... | @@ -99,13 +101,12 @@ Get Broker Property By Username |
99 | 101 | Дочекатись синхронізації з майданчиком |
100 | 102 | [Arguments] ${username} |
101 | 103 | [Documentation] |
102 | - ... ${ARGUMENTS[0]} == username | |
103 | - ... ${ARGUMENTS[1]} == tenderId | |
104 | - ... ${ARGUMENTS[2]} == id | |
105 | - | |
104 | + ... Get ${wait_timeout} for specified user and wait | |
105 | + ... until that timeout runs out. | |
106 | 106 | ${now}= Get Current Date |
107 | 107 | ${delta}= Subtract Date From Date ${now} ${TENDER['LAST_MODIFICATION_DATE']} |
108 | - ${wait_timeout}= Subtract Time From Time ${BROKERS['${USERS.users['${username}'].broker}'].timeout_on_wait} ${delta} | |
108 | + ${timeout_on_wait}= Get Broker Property By Username ${username} timeout_on_wait | |
109 | + ${wait_timeout}= Subtract Time From Time ${timeout_on_wait} ${delta} | |
109 | 110 | Run Keyword If ${wait_timeout}>0 Sleep ${wait_timeout} |
110 | 111 | |
111 | 112 | Звірити поле тендера |
... | ... | @@ -177,7 +178,8 @@ Normal |
177 | 178 | Log ${username} |
178 | 179 | Log ${command} |
179 | 180 | Log ${arguments} |
180 | - Run Keyword And Return ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file}.${command} ${username} @{arguments} | |
181 | + ${keywords_file}= Get Broker Property By Username ${username} keywords_file | |
182 | + Run Keyword And Return ${keywords_file}.${command} ${username} @{arguments} | |
181 | 183 | |
182 | 184 | SwitchState |
183 | 185 | [Arguments] ${username} ${command} @{arguments} |
... | ... | @@ -186,7 +188,8 @@ SwitchState |
186 | 188 | log ${arguments} |
187 | 189 | Remove From List ${arguments} 0 |
188 | 190 | log ${arguments} |
189 | - ${status} ${value}= run_keyword_and_ignore_keyword_definitions ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file}.${command} ${username} @{arguments} | |
191 | + ${keywords_file}= Get Broker Property By Username ${username} keywords_file | |
192 | + ${status} ${value}= run_keyword_and_ignore_keyword_definitions ${keywords_file}.${command} ${username} @{arguments} | |
190 | 193 | Run keyword if '${status}' == 'PASS' Log Учасник ${username} зміг виконати "${command}" WARN |
191 | 194 | [return] ${value} |
192 | 195 | ... | ... |
Please
register
or
login
to post a comment