Permalink
Cannot retrieve contributors at this time
md-query-saml-uat/md-query.robot
Go to file# https://tools.ietf.org/html/draft-young-md-query-09 | |
*** Settings *** | |
Library Collections | |
Library Process | |
Resource MDQ.robot | |
Variables variables.py | |
*** Test Cases *** | |
2.2.1 HTTP Version (Required) | |
# Using curl because the Requests library doesn't let us specify HTTP version | |
${Curl} Run Process /usr/bin/curl --http1.0 -i ${BASE_URL}entities/${ENTITY_ID_ENCODED} |head -n 1 shell=true | |
Should Contain ${Curl.stdout} 505 HTTP Version Not Supported msg=MUST NOT support HTTP versions prior to 1.1 | |
${Curl} Run Process /usr/bin/curl --http1.1 -i ${BASE_URL}entities/${ENTITY_ID_ENCODED} |head -n 1 shell=true | |
Should Contain ${Curl.stdout} 200 OK msg=MUST support HTTP version 1.1 | |
2.2.2 HTTP Version (Optional) | |
[Tags] optional | |
${Curl} Run Process /usr/bin/curl --http2 -i ${BASE_URL}entities/${ENTITY_ID_ENCODED} |head -n 1 shell=true | |
Should Contain ${Curl.stdout} 200 OK msg=MAY support HTTP versions later than 1.1 | |
2.5 Response Headers (Required) | |
# Content-Encoding | |
${resp}= Get With Gzip uri=entities/${ENTITY_ID_ENCODED} | |
Dictionary Should Contain Key ${resp.headers} content-encoding msg=MUST return Content-Encoding header if compressed | |
# Content-Type | |
${resp}= Get uri=entities/${ENTITY_ID_ENCODED} | |
Dictionary Should Contain Key ${resp.headers} content-type msg=MUST return Content-Type header | |
# ETag | |
${resp}= Get uri=entities/${ENTITY_ID_ENCODED} | |
Dictionary Should Contain Key ${resp.headers} etag msg=MUST return ETag header | |
2.5 Response Headers (Optional) | |
[Tags] optional | |
#Cache-Control | |
${resp}= Get uri=entities/${ENTITY_ID_ENCODED} | |
Dictionary Should Contain Key ${resp.headers} cache-control msg=SHOULD return Cache-Control header | |
# Content-Length | |
${resp}= Get uri=entities/${ENTITY_ID_ENCODED} | |
Dictionary Should Contain Key ${resp.headers} content-length msg=SHOULD return Content-Length header | |
# Last-Modified | |
${resp}= Get uri=entities/${ENTITY_ID_ENCODED} | |
Dictionary Should Contain Key ${resp.headers} last-modified msg=SHOULD return Last-Modified header | |
4.1 Conditional Retrieval | |
[Tags] optional | |
Get uri=entities/${ENTITY_ID_ENCODED} | |
${resp}= Get uri=/entities/${ENTITY_ID_ENCODED} | |
Should Be Equal As Strings ${resp.status_code} 304 msg=SHOULD return HTTP status code 304 | |
# 4.2 Content Caching | |
4.3 Content Compression | |
${resp}= Get With Gzip uri=entities/${ENTITY_ID_ENCODED} | |
Should Be Equal As Strings ${resp.status_code} 200 msg=MUST support gzip compression | |
Dictionary Should Contain Item ${resp.headers} content-encoding gzip msg=MUST support gzip compression |