awscli
The atago project wrote these specs on its own initiative and runs them in its own CI, to exercise atago against a real program. They are not awscli’s official test suite, and the awscli project is not affiliated with atago.
Summary #
1 suite · 4 scenarios
Contents #
- aws-cli against MinIO (offline cloud-CLI story) — 4 scenarios
aws-cli against MinIO (offline cloud-CLI story) #
Source: test/e2e/thirdparty/awscli/awscli.atago.yaml
Scenario: bucket and object lifecycle round-trips byte-identically #
only when aws --version succeeds
Given #
- Background service
miniois started:minio server data --address 127.0.0.1:18530. - Fixture file
payload.txtis created.
Inputs #
Fixture payload.txt:
hello from atago via the aws cli
When #
aws --endpoint-url http://127.0.0.1:18530 s3 mb s3://mybucket
aws --endpoint-url http://127.0.0.1:18530 s3 cp payload.txt s3://mybucket/key.txt
aws --endpoint-url http://127.0.0.1:18530 s3 ls s3://mybucket/
aws --endpoint-url http://127.0.0.1:18530 s3 cp s3://mybucket/key.txt roundtrip.txt
aws --endpoint-url http://127.0.0.1:18530 s3 rm s3://mybucket/key.txt
aws --endpoint-url http://127.0.0.1:18530 s3 ls s3://mybucket/
Then #
- after
aws --endpoint-url http://127.0.0.1:18530 s3 mb s3://mybucket:- exit code is
0 - stdout contains
make_bucket: mybucket
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18530 s3 cp payload.txt s3://mybucket/key.txt:- exit code is
0
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18530 s3 ls s3://mybucket/:- exit code is
0 - stdout contains
key.txt
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18530 s3 cp s3://mybucket/key.txt roundtrip.txt:- exit code is
0 - file
roundtrip.txtcontainshello from atago via the aws cli
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18530 s3 rm s3://mybucket/key.txt:- exit code is
0
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18530 s3 ls s3://mybucket/:- exit code is
0 - stdout does not contain
key.txt
- exit code is
Scenario: head-object and list-objects expose a JSON contract #
only when aws --version succeeds
Given #
- Background service
miniois started:minio server data --address 127.0.0.1:18531. - Fixture file
obj.txtis created.
Inputs #
Fixture obj.txt:
twelve bytes
When #
aws --endpoint-url http://127.0.0.1:18531 s3 mb s3://jsonbucket
aws --endpoint-url http://127.0.0.1:18531 s3 cp obj.txt s3://jsonbucket/obj.txt
aws --endpoint-url http://127.0.0.1:18531 s3api head-object --bucket jsonbucket --key obj.txt --output json
aws --endpoint-url http://127.0.0.1:18531 s3 ls s3://jsonbucket/
Then #
- after
aws --endpoint-url http://127.0.0.1:18531 s3 mb s3://jsonbucket:- exit code is
0
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18531 s3 cp obj.txt s3://jsonbucket/obj.txt:- exit code is
0
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18531 s3api head-object --bucket jsonbucket --key obj.txt --output json:- exit code is
0 - stdout at
$.ContentLengthequals12 - stdout at
$.ETagmatches/^"[0-9a-f]{32}"$/
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18531 s3 ls s3://jsonbucket/:- exit code is
0 - stdout contains
obj.txt
- exit code is
Scenario: a presigned URL is fetchable without credentials #
only when aws --version succeeds
Given #
- Background service
miniois started:minio server data --address 127.0.0.1:18532. - Fixture file
signed.txtis created.
Inputs #
Fixture signed.txt:
presigned body content
When #
aws --endpoint-url http://127.0.0.1:18532 s3 mb s3://signbucket
aws --endpoint-url http://127.0.0.1:18532 s3 cp signed.txt s3://signbucket/signed.txt
aws --endpoint-url http://127.0.0.1:18532 s3 presign s3://signbucket/signed.txt
# capture ${url} from stdout
curl -s "${url}"
Then #
- after
aws --endpoint-url http://127.0.0.1:18532 s3 mb s3://signbucket:- exit code is
0
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18532 s3 cp signed.txt s3://signbucket/signed.txt:- exit code is
0
- exit code is
- after
curl -s "${url}":- exit code is
0 - stdout equals an exact value
- exit code is
Scenario: head-object on a missing key fails with Not Found #
only when aws --version succeeds
Given #
- Background service
miniois started:minio server data --address 127.0.0.1:18533.
When #
aws --endpoint-url http://127.0.0.1:18533 s3 mb s3://errbucket
aws --endpoint-url http://127.0.0.1:18533 s3api head-object --bucket errbucket --key nope.txt
Then #
- after
aws --endpoint-url http://127.0.0.1:18533 s3 mb s3://errbucket:- exit code is
0
- exit code is
- after
aws --endpoint-url http://127.0.0.1:18533 s3api head-object --bucket errbucket --key nope.txt:- exit code is one of
254,255 - stderr contains
Not Found
- exit code is one of