Skip to content
Permalink
358bcb5960
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
78 lines (69 sloc) 3.09 KB
*** Settings ***
Library XML
Resource MDQ.robot
Default Tags single-entity
*** Test Cases ***
URN-Style Entity ID
[Documentation] GET an entity with a URN-style entityID
[Tags] http-get entity-id-urn
${resp}= Get uri=/entities/urn:mace:incommon:internet2.edu
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
URL-Style Entity ID
[Documentation] GET an entity with a URL-style entityID
[Tags] http-get entity-id-url
${resp}= Get uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
Gzip Encoding
[Documentation] GET an entity with gzip encoding
[Tags] http-get entity-id-urn gzip
${resp}= Get With Gzip uri=/entities/urn:mace:incommon:internet2.edu
Should Be Equal As Strings ${resp.status_code} 200
#Should Be Equal ${resp.encoding} gzip
Should Be Equal ${resp.headers['content-encoding']} gzip
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
Colons Encoded
[Documentation] GET an entity with colons in the entityID percent-encoded
[Tags] http-get entity-id-urn encode-colons
${resp}= Get uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
Colons Unencoded
[Documentation] GET an entity with colons in the entityID percent-encoded
[Tags] http-get entity-id-urn encode-colons
${resp}= Get uri=/entities/urn:mace:incommon:internet2.edu
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
Lowercase Encoding
[Documentation] GET an entity using lowercase percent-encoding
[Tags] http-get entity-id-url encoding-lowercase
${resp}= Get uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
Uppercase Encoding
[Documentation] GET an entity using uppercase percent-encoding
[Tags] http-get entity-id-url encoding-uppercase
${resp}= Get uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
SHA-1 Hash
[Documentation] GET an entity by the SHA-1 hash of its entityID
[Tags] http-get sha-1
# `$ echo -n urn:mace:incommon:internet2.edu |shasum -a 1`
${resp}= Get uri=/entities/{sha1}c58d27e972e66f1f26ad5318b303bca955a56021
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
#Should Be Equal ${root.tag} EntityDescriptor
Head Entity
[Documentation] HEAD an entity
[Tags] http-head entity-id-urn
${resp}= Head uri=/entities/urn:mace:incommon:internet2.edu
Should Be Equal As Strings ${resp.status_code} 200