bat/tests/syntax-tests/highlighted/Robot Framework/recipe141_aws_simple_storag...

32 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*** Settings ***
Documentation PROBLEM:
... You want to test the existence of a file in an AWS S3 bucket
... without using lower level Python code or developing a custom library.
... DISCUSSION:
... This recipe demonstrates:
... - using a Suite Teardown to end the test suite cleanly
... - using keywords from an external library
... - accessing OS Environment Variables directly using %{} syntax
... This recipe has the following external dependencies:
... $ pip install --upgrade robotframework-aws
... This recipe also requires the following OS environment variables:
... AWS_ACCESS_KEY_ID
... AWS_SECRET_ACCESS_KEY
Suite Teardown  Delete All Sessions
Library  AWSLibrary
Force Tags  no-ci-testing
*** Variables ***
${recipe} Recipe 14.1 AWS Simple Storage Service
${level} Intermediate
${category} External Library: AWSLibrary
${REGION} us-east-1
${BUCKET} YOUR_BUCKET_NAME_GOES_HERE
${KEY} YOUR_FILE_PATH_GOES_HERE
*** Test Cases ***
Check Key Exists In Bucket
 Log Variables
 Create Session With Keys ${REGION} %{AWS_ACCESS_KEY_ID} %{AWS_SECRET_ACCESS_KEY}
 Key Should Exist ${BUCKET} ${KEY}