Skip to content

Commit

Permalink
Check lowercase/uppercase encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
dshafer committed Nov 1, 2018
1 parent 645a8df commit 20da1a7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
15 changes: 15 additions & 0 deletions rfc3986.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://www.rfc-editor.org/rfc/rfc3986.txt

*** Settings ***
Resource MDQ.robot
Variables variables.py

*** Test Cases ***
2.1 Percent Encoding
# If two URIs differ only in the case of hexadecimal digits used in
# percent-encoded octets, they are equivalent.
${resp}= Get Entity baseUrl=${BASE_URL} identifier=${ENTITY_ID_ENCODED_UPPERCASE}
Should Be Equal As Strings ${resp.status_code} 200 msg=MUST respond to uppercase percent-encoding

${resp}= Get Entity baseUrl=${BASE_URL} identifier=${ENTITY_ID_ENCODED_LOWERCASE}
Should Be Equal As Strings ${resp.status_code} 200 msg=MUST respond to lowercase percent-encoding
16 changes: 11 additions & 5 deletions variables.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@
BASE_URL = "http://md.sandbox.ti.internet2.edu"

# Any known existing entityID
ENTITY_ID = "urn:mace:incommon:internet2.edu"
ENTITY_ID = "https://fm.incommon.org/sp"

# Percent-encoded form of ENTITY_ID above
ENTITY_ID_ENCODED = "urn:mace:incommon:internet2.edu"
ENTITY_ID_ENCODED = "https:%2F%2Ffm.incommon.org%2Fsp"

# Percent-encoded form of ENTITY_ID above using uppercase percent-encoding
ENTITY_ID_ENCODED_UPPERCASE = "https:%2F%2Ffm.incommon.org%2Fsp"

# Percent-encoded form of ENTITY_ID above using lowercase percent-encoding
ENTITY_ID_ENCODED_LOWERCASE = "https:%2f%2ffm.incommon.org%2fsp"

# SHA-1 transformed form of ENTITY_ID above
ENTITY_ID_SHA1 = "2cb369971729a3e5e30ad48ae408aeafad613645"
ENTITY_ID_SHA1 = "20f0fe93f679ac8a2ddcf0822ecdec007c56546f"

# InCommon URL-style entityID
INC_ENTITY_ID_URL = "https://carmenwiki.osu.edu/shibboleth"
INC_ENTITY_ID_URL = "https://fm.incommon.org/sp"

# Percent-encoded form of INC_ENTITY_ID_URL above
INC_ENTITY_ID_URL_ENCODED = "https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth"
INC_ENTITY_ID_URL_ENCODED = "https:%2F%2Ffm.incommon.org%2Fsp"

# InCommon URN-style entityID
INC_ENTITY_ID_URN = "urn:mace:incommon:internet2.edu"

0 comments on commit 20da1a7

Please sign in to comment.