Skip to content

Commit 62570b9

Browse files
committed
fix logging integration tests schemas (selenium related)
1 parent 7768f31 commit 62570b9

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

apps/integration_tests/log_event_schemas.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"auth_client_id": {"type": "string"},
4747
"auth_app_id": {"type": "string"},
4848
"auth_app_name": {"pattern": "TestApp"},
49-
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
49+
"auth_app_data_access_type": {"pattern": "THIRTEEN_MONTH"},
5050
"auth_share_demographic_scopes": {"pattern": "^True$"},
5151
"auth_require_demographic_scopes": {"pattern": "^True$"},
5252
},
@@ -94,7 +94,7 @@
9494
"auth_client_id": {"type": "string"},
9595
"auth_app_id": {"type": "string"},
9696
"auth_app_name": {"pattern": "TestApp"},
97-
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
97+
"auth_app_data_access_type": {"pattern": "THIRTEEN_MONTH"},
9898
"auth_require_demographic_scopes": {"pattern": "^True$"},
9999
"req_qparam_client_id": {"type": "string"},
100100
"req_qparam_lang": {"type": "string"},
@@ -129,7 +129,7 @@
129129
"auth_client_id": {"type": "string"},
130130
"auth_app_id": {"type": "string"},
131131
"auth_app_name": {"pattern": "TestApp"},
132-
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
132+
"auth_app_data_access_type": {"pattern": "THIRTEEN_MONTH"},
133133
"auth_require_demographic_scopes": {"pattern": "^True$"},
134134
"path": {"pattern": "/mymedicare/login"},
135135
"request_method": {"pattern": "GET"},
@@ -158,7 +158,7 @@
158158
"auth_client_id": {"type": "string"},
159159
"auth_app_id": {"type": "string"},
160160
"auth_app_name": {"pattern": "TestApp"},
161-
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
161+
"auth_app_data_access_type": {"pattern": "THIRTEEN_MONTH"},
162162
"auth_crosswalk_action": {"enum": ["R", "C"]},
163163
"auth_require_demographic_scopes": {"pattern": "^True$"},
164164
"req_user_id": {"type": "number"},
@@ -195,7 +195,7 @@
195195
"auth_client_id": {"type": "string"},
196196
"auth_app_id": {"type": "string"},
197197
"auth_app_name": {"pattern": "TestApp"},
198-
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
198+
"auth_app_data_access_type": {"pattern": "THIRTEEN_MONTH"},
199199
"auth_crosswalk_action": {"enum": ["R", "C"]},
200200
"auth_require_demographic_scopes": {"pattern": "^True$"},
201201
"req_qparam_client_id": {"type": "string"},
@@ -235,13 +235,13 @@
235235
"auth_client_id": {"type": "string"},
236236
"auth_app_id": {"type": "string"},
237237
"auth_app_name": {"pattern": "TestApp"},
238-
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
238+
"auth_app_data_access_type": {"pattern": "THIRTEEN_MONTH"},
239239
"auth_crosswalk_action": {"enum": ["R", "C"]},
240240
"auth_require_demographic_scopes": {"pattern": "^True$"},
241241
"req_redirect_uri": {"type": "string"},
242242
"req_scope": {"type": "string"},
243243
"req_share_demographic_scopes": {"pattern": "^True$"},
244-
"req_allow": {"pattern": "Allow"},
244+
"req_allow": {"pattern": "Connect"},
245245
"req_user_id": {"type": "integer"},
246246
"req_user_username": {"type": "string"},
247247
"req_fhir_id": {"type": "string"},

docker-compose.selenium.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ services:
5050
bb2slsx:
5151
build: .
5252
command: ./docker-compose/bluebutton_server_start.sh
53+
environment:
54+
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
5355
env_file:
5456
# local devel specific variables go here!
5557
- .env

docker-compose/run_selenium_tests_local.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ display_usage() {
4040
echo
4141
echo "-h Print this Help."
4242
echo "-p Use new permissions screen (defaults to old style screen)."
43+
echo "-l Selenium run in headless mode."
44+
echo "-t Show test case actions on std out."
4345
echo
4446
}
4547

@@ -77,17 +79,25 @@ export SERVICE_NAME="selenium-tests"
7779
export TESTS_LIST="./apps/integration_tests/selenium_tests.py ./apps/integration_tests/selenium_spanish_tests.py"
7880
export DJANGO_SETTINGS_MODULE="hhs_oauth_server.settings.dev"
7981
export BB2_SERVER_STD2FILE=""
82+
# selenium headless
83+
export SELENIUM_HEADLESS=false
84+
# Show test actions on std out : pytest -s
85+
PYTEST_SHOW_TRACE_OPT=''
8086

8187
set_slsx
8288

8389
# Parse command line option
84-
while getopts "hp" option; do
90+
while getopts "hplt" option; do
8591
case $option in
8692
h)
8793
display_usage
8894
exit;;
8995
p)
9096
export USE_NEW_PERM_SCREEN=true;;
97+
l)
98+
export SELENIUM_HEADLESS=true;;
99+
t)
100+
export PYTEST_SHOW_TRACE_OPT='-s';;
91101
\?)
92102
display_usage
93103
exit;;
@@ -139,6 +149,7 @@ fi
139149

140150
echo "DJANGO_SETTINGS_MODULE: " ${DJANGO_SETTINGS_MODULE}
141151
echo "HOSTNAME_URL: " ${HOSTNAME_URL}
152+
echo "Selenium headless mode=" ${SELENIUM_HEADLESS}
142153

143154
# Set SYSTEM
144155
SYSTEM=$(uname -s)
@@ -214,7 +225,7 @@ echo "MSLSX=" ${USE_MSLSX}
214225
echo "SERVICE NAME=" ${SERVICE_NAME}
215226
echo "USE_NEW_PERM_SCREEN=" ${USE_NEW_PERM_SCREEN}
216227

217-
docker-compose -f docker-compose.selenium.yml run --service-ports ${SERVICE_NAME} bash -c "pytest ${TESTS_LIST}"
228+
docker-compose -f docker-compose.selenium.yml run --service-ports ${SERVICE_NAME} bash -c "DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE} SELENIUM_HEADLESS=${SELENIUM_HEADLESS} pytest ${PYTEST_SHOW_TRACE_OPT} ${TESTS_LIST}"
218229

219230
#Stop containers after use
220231
echo_msg

docker-compose/run_selenium_tests_remote.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ display_usage() {
2727
echo "-h Print this Help."
2828
echo "-p Test for newer permissions screen. Defaults to older screen."
2929
echo "-l Selenium run in headless mode."
30+
echo "-t Show test case actions on std out."
3031
echo
3132
echo "Examples:"
3233
echo

0 commit comments

Comments
 (0)