Skip to content
Permalink
d613bf1f3c
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
77 lines (68 sloc) 3.06 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
${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
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 (Lowercase)
[Documentation] GET an entity by the lowercase SHA-1 hash of its entityID
[Tags] http-get sha-1 sha-1-lowercase
# `$ echo urn:mace:incommon:internet2.edu |shasum`
${resp}= Get uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2
Should Be Equal As Strings ${resp.status_code} 200
${root}= Parse XML ${resp.text}
Should Be Equal ${root.tag} EntityDescriptor
SHA-1 Hash (Uppercase)
[Documentation] GET an entity by the uppercase SHA-1 hash of its entityID
[Tags] http-get sha-1 sha-1-uppercase
${resp}= Get uri=/entities/15FD47B743804831A6A443A37170C8983116C7A2
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