From 45703b79e775dc04e4f6ce150be721d660c10030 Mon Sep 17 00:00:00 2001 From: James Babb Date: Thu, 1 Nov 2018 09:29:50 -0500 Subject: [PATCH 1/3] dockerized mdq testing --- docker/Dockerfile | 15 + docker/README.md | 102 +++++ docker/docker-compose.yml | 13 + docker/out.xml | 779 ++++++++++++++++++++++++++++++++++++++ docker/run-it.sh | 40 ++ 5 files changed, 949 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md create mode 100644 docker/docker-compose.yml create mode 100644 docker/out.xml create mode 100755 docker/run-it.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..3121059 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,15 @@ +FROM python:2.7 + +RUN pip install robotframework-requests \ + && mkdir /opt/app \ + && cd /opt/app \ + && git clone https://github.internet2.edu/internet2/md-query-saml-uat.git /opt/app + +WORKDIR /opt/app + +# Copy in run-it script and a user included variables.py +COPY . /opt/app + +CMD ["/bin/bash", "/opt/app/run-it.sh"] + + diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..c39a1d1 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,102 @@ +# md-query-saml-uat + +Docker Container for running User acceptance tests for a service implementing the SAML metadata profile of the Metadata Query Protocol. + +See also: + +* [Metadata Query Protocol](https://tools.ietf.org/html/draft-young-md-query-09) +* [SAML Profile for the Metadata Query Protocol](https://tools.ietf.org/html/draft-young-md-query-saml-09) + + +## Usage + +### Build + +Copy in your variables.py file. A default example file will be used if none exists + +Build your docker container +``` + docker build . -t mdq-tests +``` + +### Run + +Run your docker container attached to STDIN to answer the questions +``` + docker run -it mdq-tests +``` + +Example Run +``` + $ docker run -it mdq-tests + No variables.py file found. Copying example... + Do you want to exclude aggregate tests? + 1) Yes -- Skip Aggregate Tests + 2) No -- Do not Skip Aggregate Tests + #? 1 + ============================================================================== + App + ============================================================================== + App.InCommon + ============================================================================== + URL-Style Entity ID :: GET an entity with a URL-style entityID | PASS | + ------------------------------------------------------------------------------ + URN-Style Entity ID :: GET an entity with a URN-style entityID | PASS | + ------------------------------------------------------------------------------ + App.InCommon | PASS | + 2 critical tests, 2 passed, 0 failed + 2 tests total, 2 passed, 0 failed + ...output truncated from readme... + ============================================================================== + Output: /opt/app/output.xml + Log: /opt/app/log.html + Report: /opt/app/report.html + + Container still running if you want to copy out any output files + Container name: 6f60f5b17e17 + Example: docker cp 6f60f5b17e17:/opt/app/report.html \~/mdq_test_report.html + Press any key to exit... +``` + +### Getting Reports + +If you want, you can copy out the output, log, or report after the container has run. +Alternatively, you could volume mount in those files to have them written straight out of your container. + +``` + touch /path/to/out.xml + docker run -it -v /path/to/out.xml:/opt/app/output.xml mdq-tests +``` + +### Non-interactive Mode + +To run the container non-interactively: + +``` + docker run -it -e SKIP_AGGREGATE=YES mdq-tests +``` + +Set SKIP_AGGREGATE to YES to skip aggregate tests or NO to run aggregate tests. This value is case-sensitive + +### docker-compose + +A docker-compose file has been provided for your convenience + +``` + docker-compose up --build +``` + +Uncomment any volume mounts you want in docker-compose.yml. Set the SKIP_AGGREGATE variable to whichever value you want. + + +## To Do + +??? + +## Contributing + +1. Clone the repository +2. Create a new feature branch +3. Commit your changes and push to the repository +4. Create a pull request from your feature branch against the `master` branch +5. After your changes have been merged, you may delete your feature branch diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..3759e34 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,13 @@ +version: '3' +services: + mdq-tests: + build: + context: . + command: /bin/bash /opt/app/run-it.sh + environment: + #- SKIP_AGGREGATE=NO + - SKIP_AGGREGATE=YES + #volumes: + #- /path/to/output.xml:/opt/app/output.xml + #- /path/to/log.html:/opt/app/log.html + #- /path/to/report.html:/opt/app/report.html diff --git a/docker/out.xml b/docker/out.xml new file mode 100644 index 0000000..5c5abe5 --- /dev/null +++ b/docker/out.xml @@ -0,0 +1,779 @@ + + + + + + + +baseUrl=${BASE_URL} +identifier=${INC_ENTITY_ID_URL_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<type 'int'> +<type 'unicode'> + + +GET an entity with a URL-style entityID + + + + + +baseUrl=${BASE_URL} +identifier=${INC_ENTITY_ID_URN} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<type 'int'> +<type 'unicode'> + + +GET an entity with a URN-style entityID + + + + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 +msg=MUST respond to a unique identifier + +Argument types are: +<type 'int'> +<type 'unicode'> + + + + + + + +baseUrl=${BASE_URL} +identifier={sha1}${ENTITY_ID_SHA1} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/{sha1}2cb369971729a3e5e30ad48ae408aeafad613645, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 +msg=MUST respond to SHA-1 transformed identifier + +Argument types are: +<type 'int'> +<type 'unicode'> + + + + + + + +baseUrl=${BASE_URL} +identifier=foo + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/foo, headers=None json=None +${resp} = <Response [404]> + + +${resp} = <Response [404]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +404 +msg=MUST return HTTP status code 404 + +Argument types are: +<type 'int'> +<type 'unicode'> + + + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Parses the given XML file or string into an element structure. + +${resp.text} + + +${root} + +${root} = <Element 'EntityDescriptor' at 0x7f4b342aaea0> + + + +Fails if the given objects are unequal. + +${root.tag} +EntityDescriptor +msg=MUST use EntityDescriptor document element + +Argument types are: +<type 'str'> +<type 'unicode'> + + + +Fails if ``container`` contains ``item`` one or more times. + +${resp.text} +EntitiesDescriptor +msg=MUST NOT use EntitiesDescriptor element + + + + +An item of ``key``/``value`` must be found in a `dictionary`. + +${resp.headers} +content-type +application/samlmetadata+xml +msg=MUST return Content-Type=application/samlmetadata+xml header + + + + + + + + + + +Runs a process and waits for it to complete. + +/usr/bin/curl --http1.0 -i ${BASE_URL}/entities/${ENTITY_ID_ENCODED} |head -n 1 +shell=true + + +${Curl} + +Starting process: +/usr/bin/curl --http1.0 -i http://md.sandbox.ti.internet2.edu/entities/urn:mace:incommon:internet2.edu |head -n 1 +Waiting for process to complete. +Process completed. +${Curl} = <result object with rc 0> + + + +Fails if ``container`` does not contain ``item`` one or more times. + +${Curl.stdout} +505 +msg=MUST NOT support HTTP versions prior to 1.1 + +MUST NOT support HTTP versions prior to 1.1: 'HTTP/1.1 200 OK' does not contain '505' + + +MUST NOT support HTTP versions prior to 1.1: 'HTTP/1.1 200 OK' does not contain '505' + + + +Runs a process and waits for it to complete. + +/usr/bin/curl --http2 -i ${BASE_URL}/entities/${ENTITY_ID_ENCODED} |head -n 1 +shell=true + + +${Curl} + +Starting process: +/usr/bin/curl --http2 -i http://md.sandbox.ti.internet2.edu/entities/urn:mace:incommon:internet2.edu |head -n 1 +Waiting for process to complete. +Process completed. +${Curl} = <result object with rc 0> + + + +Fails if ``container`` does not contain ``item`` one or more times. + +${Curl.stdout} +200 OK +msg=MAY support HTTP versions later than 1.1 + + + + +optional + + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Creates and returns a dictionary based on the given ``items``. + +Accept-Encoding=gzip + + +&{headers} + +&{headers} = { Accept-Encoding=gzip } + + + +Send a GET request on the session object found using the + +alias=md +uri=entities/${identifier} +headers=${headers} + + +${resp} + +Get Request using : alias=md, uri=entities/urn:mace:incommon:internet2.edu, headers={u'Accept-Encoding': u'gzip'} json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if ``key`` is not found from ``dictionary``. + +${resp.headers} +content-encoding +msg=MUST return Content-Encoding header if compressed + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if ``key`` is not found from ``dictionary``. + +${resp.headers} +content-type +msg=MUST return Content-Type header + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if ``key`` is not found from ``dictionary``. + +${resp.headers} +etag +msg=MUST return ETag header + + + + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if ``key`` is not found from ``dictionary``. + +${resp.headers} +cache-control +msg=SHOULD return Cache-Control header + +SHOULD return Cache-Control header + + + +optional + +SHOULD return Cache-Control header + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Returns a value from the given ``dictionary`` based on the given ``key``. + +${resp.headers} +ETag + + +${etag} + +${etag} = "e85fc03609236442b8055c984b2dd4b3" + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} +etag=${etag} + + +${resp} + + +Creates and returns a dictionary based on the given ``items``. + +If-None-Match=${etag} + + +&{headers} + +&{headers} = { If-None-Match="e85fc03609236442b8055c984b2dd4b3" } + + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=/entities/${identifier} +headers=${headers} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers={u'If-None-Match': '"e85fc03609236442b8055c984b2dd4b3"'} json=None +${resp} = <Response [304]> + + +${resp} = <Response [304]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +304 +msg=SHOULD return HTTP status code 304 + +Argument types are: +<type 'int'> +<type 'unicode'> + + + +optional + + + + + + +baseUrl=${BASE_URL} +identifier=${ENTITY_ID_ENCODED} + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=${baseUrl} + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Creates and returns a dictionary based on the given ``items``. + +Accept-Encoding=gzip + + +&{headers} + +&{headers} = { Accept-Encoding=gzip } + + + +Send a GET request on the session object found using the + +alias=md +uri=entities/${identifier} +headers=${headers} + + +${resp} + +Get Request using : alias=md, uri=entities/urn:mace:incommon:internet2.edu, headers={u'Accept-Encoding': u'gzip'} json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 +msg=MUST support gzip compression + +Argument types are: +<type 'int'> +<type 'unicode'> + + + +An item of ``key``/``value`` must be found in a `dictionary`. + +${resp.headers} +content-encoding +gzip +msg=MUST support gzip compression + + + + + + + + + + + +Critical Tests +All Tests + + +optional + + +App +App.InCommon +App.Md-Query-Saml +App.Md-Query + + + + + diff --git a/docker/run-it.sh b/docker/run-it.sh new file mode 100755 index 0000000..dca25f4 --- /dev/null +++ b/docker/run-it.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +YES="Yes -- Skip Aggregate Tests" +NO="No -- Do not Skip Aggregate Tests" + +# Make sure there is a variables.py file. If not, copy one in +if [ ! -f /opt/app/variables.py ]; then + echo "No variables.py file found. Copying example..." + cp /opt/app/variables.py.example /opt/app/variables.py +fi + +# Test for environment variable to run non-interactive +if [ -n "$SKIP_AGGREGATE" ]; then + if [ "$SKIP_AGGREGATE" == "YES" ]; then + robot --noncritical optional --exclude aggregate /opt/app + elif [ "$SKIP_AGGREGATE" == "NO" ]; then + robot --noncritical optional /opt/app + else + echo "Bad value for SKIP_AGGREGATE. Should be YES/NO. Set to $SKIP_AGGREGATE" + fi +else + # Prompt for long running tests + echo "Do you want to exclude aggregate tests?" + select yn in "$YES" "$NO"; do + case $yn in + "$YES" ) robot --noncritical optional --exclude aggregate /opt/app; break;; + "$NO" ) robot --noncritical optional /opt/app; break;; + esac + echo "Pick a number:" + done + + echo "" + + # Keep the container open in case someone wants to copy out the output files + echo "Container still running if you want to copy out any output files" + echo "Container name: `cat /etc/hostname`" + echo " Example: docker cp `cat /etc/hostname`:/opt/app/report.html ~/mdq_test_report.html" + read -p "Press any key to exit..." + +fi From 142d585e2d27a0d63e6eed9da4b021528c346ae9 Mon Sep 17 00:00:00 2001 From: jbabb Date: Thu, 1 Nov 2018 09:36:55 -0500 Subject: [PATCH 2/3] Delete out.xml -- unnecessary file --- docker/out.xml | 779 ------------------------------------------------- 1 file changed, 779 deletions(-) delete mode 100644 docker/out.xml diff --git a/docker/out.xml b/docker/out.xml deleted file mode 100644 index 5c5abe5..0000000 --- a/docker/out.xml +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - -baseUrl=${BASE_URL} -identifier=${INC_ENTITY_ID_URL_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<type 'int'> -<type 'unicode'> - - -GET an entity with a URL-style entityID - - - - - -baseUrl=${BASE_URL} -identifier=${INC_ENTITY_ID_URN} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<type 'int'> -<type 'unicode'> - - -GET an entity with a URN-style entityID - - - - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 -msg=MUST respond to a unique identifier - -Argument types are: -<type 'int'> -<type 'unicode'> - - - - - - - -baseUrl=${BASE_URL} -identifier={sha1}${ENTITY_ID_SHA1} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/{sha1}2cb369971729a3e5e30ad48ae408aeafad613645, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 -msg=MUST respond to SHA-1 transformed identifier - -Argument types are: -<type 'int'> -<type 'unicode'> - - - - - - - -baseUrl=${BASE_URL} -identifier=foo - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/foo, headers=None json=None -${resp} = <Response [404]> - - -${resp} = <Response [404]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -404 -msg=MUST return HTTP status code 404 - -Argument types are: -<type 'int'> -<type 'unicode'> - - - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Parses the given XML file or string into an element structure. - -${resp.text} - - -${root} - -${root} = <Element 'EntityDescriptor' at 0x7f4b342aaea0> - - - -Fails if the given objects are unequal. - -${root.tag} -EntityDescriptor -msg=MUST use EntityDescriptor document element - -Argument types are: -<type 'str'> -<type 'unicode'> - - - -Fails if ``container`` contains ``item`` one or more times. - -${resp.text} -EntitiesDescriptor -msg=MUST NOT use EntitiesDescriptor element - - - - -An item of ``key``/``value`` must be found in a `dictionary`. - -${resp.headers} -content-type -application/samlmetadata+xml -msg=MUST return Content-Type=application/samlmetadata+xml header - - - - - - - - - - -Runs a process and waits for it to complete. - -/usr/bin/curl --http1.0 -i ${BASE_URL}/entities/${ENTITY_ID_ENCODED} |head -n 1 -shell=true - - -${Curl} - -Starting process: -/usr/bin/curl --http1.0 -i http://md.sandbox.ti.internet2.edu/entities/urn:mace:incommon:internet2.edu |head -n 1 -Waiting for process to complete. -Process completed. -${Curl} = <result object with rc 0> - - - -Fails if ``container`` does not contain ``item`` one or more times. - -${Curl.stdout} -505 -msg=MUST NOT support HTTP versions prior to 1.1 - -MUST NOT support HTTP versions prior to 1.1: 'HTTP/1.1 200 OK' does not contain '505' - - -MUST NOT support HTTP versions prior to 1.1: 'HTTP/1.1 200 OK' does not contain '505' - - - -Runs a process and waits for it to complete. - -/usr/bin/curl --http2 -i ${BASE_URL}/entities/${ENTITY_ID_ENCODED} |head -n 1 -shell=true - - -${Curl} - -Starting process: -/usr/bin/curl --http2 -i http://md.sandbox.ti.internet2.edu/entities/urn:mace:incommon:internet2.edu |head -n 1 -Waiting for process to complete. -Process completed. -${Curl} = <result object with rc 0> - - - -Fails if ``container`` does not contain ``item`` one or more times. - -${Curl.stdout} -200 OK -msg=MAY support HTTP versions later than 1.1 - - - - -optional - - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Creates and returns a dictionary based on the given ``items``. - -Accept-Encoding=gzip - - -&{headers} - -&{headers} = { Accept-Encoding=gzip } - - - -Send a GET request on the session object found using the - -alias=md -uri=entities/${identifier} -headers=${headers} - - -${resp} - -Get Request using : alias=md, uri=entities/urn:mace:incommon:internet2.edu, headers={u'Accept-Encoding': u'gzip'} json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if ``key`` is not found from ``dictionary``. - -${resp.headers} -content-encoding -msg=MUST return Content-Encoding header if compressed - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if ``key`` is not found from ``dictionary``. - -${resp.headers} -content-type -msg=MUST return Content-Type header - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if ``key`` is not found from ``dictionary``. - -${resp.headers} -etag -msg=MUST return ETag header - - - - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if ``key`` is not found from ``dictionary``. - -${resp.headers} -cache-control -msg=SHOULD return Cache-Control header - -SHOULD return Cache-Control header - - - -optional - -SHOULD return Cache-Control header - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Returns a value from the given ``dictionary`` based on the given ``key``. - -${resp.headers} -ETag - - -${etag} - -${etag} = "e85fc03609236442b8055c984b2dd4b3" - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} -etag=${etag} - - -${resp} - - -Creates and returns a dictionary based on the given ``items``. - -If-None-Match=${etag} - - -&{headers} - -&{headers} = { If-None-Match="e85fc03609236442b8055c984b2dd4b3" } - - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=/entities/${identifier} -headers=${headers} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers={u'If-None-Match': '"e85fc03609236442b8055c984b2dd4b3"'} json=None -${resp} = <Response [304]> - - -${resp} = <Response [304]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -304 -msg=SHOULD return HTTP status code 304 - -Argument types are: -<type 'int'> -<type 'unicode'> - - - -optional - - - - - - -baseUrl=${BASE_URL} -identifier=${ENTITY_ID_ENCODED} - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=${baseUrl} - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Creates and returns a dictionary based on the given ``items``. - -Accept-Encoding=gzip - - -&{headers} - -&{headers} = { Accept-Encoding=gzip } - - - -Send a GET request on the session object found using the - -alias=md -uri=entities/${identifier} -headers=${headers} - - -${resp} - -Get Request using : alias=md, uri=entities/urn:mace:incommon:internet2.edu, headers={u'Accept-Encoding': u'gzip'} json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 -msg=MUST support gzip compression - -Argument types are: -<type 'int'> -<type 'unicode'> - - - -An item of ``key``/``value`` must be found in a `dictionary`. - -${resp.headers} -content-encoding -gzip -msg=MUST support gzip compression - - - - - - - - - - - -Critical Tests -All Tests - - -optional - - -App -App.InCommon -App.Md-Query-Saml -App.Md-Query - - - - - From 5a6ac4f104eb4ba7cf78ced5b328b74b5b052fd5 Mon Sep 17 00:00:00 2001 From: jbabb Date: Thu, 1 Nov 2018 09:39:11 -0500 Subject: [PATCH 3/3] Update readme to include better explanation for variables.py --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index c39a1d1..e9c553d 100644 --- a/docker/README.md +++ b/docker/README.md @@ -12,7 +12,7 @@ See also: ### Build -Copy in your variables.py file. A default example file will be used if none exists +Copy in your variables.py file to this directory. The docker build will copy in the file on build. If you do not provide one, a default example file will be used if none exists (variables.py.example from the parent directory) Build your docker container ```