Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects

Repair robot bug with authentification.

Merged Diego MENDEZ requested to merge bugfix/robot_tests_auth into develop
5 files
+ 39
34
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -8,19 +8,16 @@ ${TOKEN} Token ${API_TOKEN}
*** Test Cases ***
TC03 Check Metrics Page
${auth}= Evaluate ("${USER_API}", "${PASSWORD_API}")
&{HEADERS} Create Dictionary Authorization=${TOKEN} Content-Type=${CONTENT_TYPE}
Create Session robot_test_session ${BASE_URL} headers=${HEADERS}
${response}= GET On session robot_test_session /${PAGE} headers=${HEADERS} auth=${auth} expected_status=200
Check Metrics Page
${response}= GET ${BASE_URL}/metrics expected_status=200
Log to console ${\n}
Check metrics response status "${response.ok}" "${PAGE}"
Check metrics response status "${response.ok}" "metrics"
Log to console ${\n}
TC03.1 Check Nonexistent Page
${auth}= Evaluate ("${USER_API}", "${PASSWORD_API}")
&{HEADERS} Create Dictionary Authorization=${TOKEN} Content-Type=${CONTENT_TYPE}
${response}= GET On session robot_test_session /api/plugins/nonexistent_plugin auth=${auth} headers=${HEADERS} expected_status=404
Check Nonexistent Page
${HEADERS} Create Dictionary Content-Type application/json Authorization ${TOKEN}
Log to console ${\n}
${response}= GET ${BASE_URL}/nonexisting_page headers=${HEADERS} expected_status=404
Log to console ${\n}
Check metrics response status "${response.ok}" "nonexistent"
Log to console ${\n}
@@ -34,4 +31,4 @@ Check metrics response status "${response.ok}" "${PAGE}"
ELSE
Log to console ${\n}${PAGE} Not Ready
Log ${\n}${PAGE} Not Ready
END
\ No newline at end of file
END
Loading