*** Settings *** Documentation Akas file plain test suite Library Collections Library Process Library RequestsLibrary Test Tags plain cli *** Variables *** ${BIN} release/akas ${PLAIN_TOKEN_FILE} tests/files/plain_token.txt ${AKAS_WAIT} 1s *** Test Cases *** Test AKAS file option: [--file] success full load [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XZ-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS file option: [-f] success full load [Documentation] File test When Start Process ${BIN} -f ${PLAIN_TOKEN_FILE} alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XZ-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS file environment variable: [AKAS_FILE] success full load [Documentation] File test When Start Process ${BIN} env:AKAS_FILE=${PLAIN_TOKEN_FILE} alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XZ-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS format option: [--format plain] option [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --format plain alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XZ-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS format environment variable: [AKAS_FORMAT=plain] [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} env:AKAS_FORMAT=plain alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XZ-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS length option: [--length] option default value (0) [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --length 0 alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XZ-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS length option: [--length] option value [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --length 6 alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XX-ZZ status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 4 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS length environment variable: [AKAS_LENGTH] [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} env:AKAS_LENGTH=6 alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XX-ZZ status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 4 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS length option: [--length] option value no key [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --length 2 alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 0 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS prefix option: [--prefix] option default value [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --prefix ${EMPTY} alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 5 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS prefix option: [--prefix] option value [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --prefix XX- alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XY-ZZZ status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 4 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS prefix environment variable: [AKAS_PREFIX] [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} env:AKAS_PREFIX=XX- alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XY-ZZZ status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 4 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS prefix option: [--prefix] option no key [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --prefix XZ- alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 0 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server Test AKAS length and prefix option: [--length] and [--prefix] options [Documentation] File test When Start Process ${BIN} --file ${PLAIN_TOKEN_FILE} --length 6 --prefix XX- alias=akas And Sleep ${AKAS_WAIT} And Check Akas End Points token=XX-XXX And Check Akas End Points token=XY-ZZZ status=401 And Check Akas End Points token=XX-ZZ status=401 ${result} = And Terminate Process akas Then Should Contain ${result.stdout} Opening file ${PLAIN_TOKEN_FILE} And Should Contain ${result.stdout} Lines count: 5 And Should Contain ${result.stdout} Tokens count: 3 And Should Contain ${result.stdout} Serving on http://localhost:5001 ... [Teardown] Kill Akas Server *** Keywords *** Kill Akas Server [Documentation] A keyword for killing AKAS process if any Log To Console Terminate All Processes kill=True Check Akas End Points [Documentation] Check the end-points of AKAS [Arguments] ${token} ${status}=200 ${port}=5001 GET http://localhost:${port}/auth-ok expected_status=200 GET http://localhost:${port}/auth-unauthorized expected_status=401 VAR &{headers}= Authorization=Bearer ${token} GET http://localhost:${port}/auth headers=${headers} expected_status=${status}