You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bat/tests/syntax-tests/highlighted/Robot Framework/recipe141_aws_simple_storag...

32 lines
2.4 KiB
Plaintext

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

*** 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}