mirror of https://github.com/sharkdp/bat
Add Robot Framework syntax test file
parent
a0a5e30c39
commit
9935c4984c
@ -0,0 +1,25 @@
|
||||
The `recipe141_aws_simple_storage_service.robot` file has been added from https://github.com/adrianyorke/robotframework-cookbook under the following license:
|
||||
|
||||
```text
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Adrian Yorke
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
@ -0,0 +1,31 @@
|
||||
*** 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}
|
Loading…
Reference in New Issue