mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into graph-panel-non-timeseries
This commit is contained in:
commit
f3d4a97f49
@ -2,7 +2,7 @@
|
||||
root = true
|
||||
|
||||
[*.go]
|
||||
indent_style = tabs
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -12,11 +12,11 @@ grunt karma:dev
|
||||
|
||||
### Run tests for backend assets before commit
|
||||
```
|
||||
test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
|
||||
test -z "$(gofmt -s -l . | grep -v -E 'vendor/(github.com|golang.org|gopkg.in)' | tee /dev/stderr)"
|
||||
```
|
||||
|
||||
### Run tests for frontend assets before commit
|
||||
```
|
||||
grunt test
|
||||
godep go test -v ./pkg/...
|
||||
npm test
|
||||
go test -v ./pkg/...
|
||||
```
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,6 +25,7 @@ public/css/*.min.css
|
||||
*.swp
|
||||
.idea/
|
||||
*.iml
|
||||
.vscode/
|
||||
|
||||
/data/*
|
||||
/bin/*
|
||||
@ -37,4 +38,4 @@ profile.cov
|
||||
.notouch
|
||||
/pkg/cmd/grafana-cli/grafana-cli
|
||||
/pkg/cmd/grafana-server/grafana-server
|
||||
/examples/*/dist
|
||||
/examples/*/dist
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
|
||||
test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing"
|
||||
exit 1
|
||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -5,11 +5,26 @@
|
||||
* **SingleStat**: Add seriename as option in singlestat panel, closes [#4740](https://github.com/grafana/grafana/issues/4740)
|
||||
* **Localization**: Week start day now dependant on browser locale setting, closes [#3003](https://github.com/grafana/grafana/issues/3003)
|
||||
* **Templating**: Update panel repeats for variables that change on time refresh, closes [#5021](https://github.com/grafana/grafana/issues/5021)
|
||||
* **Templating**: Add support for numeric and alphabetical sorting of variable values, closes [#2839](https://github.com/grafana/grafana/issues/2839)
|
||||
* **Elasticsearch**: Support to set Precision Threshold for Unique Count metric, closes [#4689](https://github.com/grafana/grafana/issues/4689)
|
||||
* **Navigation**: Add search to org swithcer, closes [#2609](https://github.com/grafana/grafana/issues/2609)
|
||||
* **Database**: Allow database config using one propertie, closes [#5456](https://github.com/grafana/grafana/pull/5456)
|
||||
* **Graphite**: Add support for groupByNode, closes [#5613](https://github.com/grafana/grafana/pull/5613)
|
||||
* **Influxdb**: Add support for elapsed(), closes [#5827](https://github.com/grafana/grafana/pull/5827)
|
||||
* **OAuth**: Add support for generic oauth, closes [#4718](https://github.com/grafana/grafana/pull/4718)
|
||||
* **Cloudwatch**: Add support to expand multi select template variable, closes [#5003](https://github.com/grafana/grafana/pull/5003)
|
||||
* **Graph Panel**: Now supports flexible lower/upper bounds on Y-Max and Y-Min, PR [#5720](https://github.com/grafana/grafana/pull/5720)
|
||||
|
||||
### Breaking changes
|
||||
* **SystemD**: Change systemd description, closes [#5971](https://github.com/grafana/grafana/pull/5971)
|
||||
* **lodash upgrade**: Upgraded lodash from 2.4.2 to 4.15.0, this contains a number of breaking changes that could effect plugins. closes [#6021](https://github.com/grafana/grafana/pull/6021)
|
||||
|
||||
### Bugfixes
|
||||
* **Table Panel**: Fixed problem when switching to Mixed datasource in metrics tab, fixes [#5999](https://github.com/grafana/grafana/pull/5999)
|
||||
* **Playlist**: Fixed problem with play order not matching order defined in playlist, fixes [#5467](https://github.com/grafana/grafana/pull/5467)
|
||||
* **Graph panel**: Fixed problem with auto decimals on y axis when datamin=datamax, fixes [#6070](https://github.com/grafana/grafana/pull/6070)
|
||||
* **Snapshot**: Can view embedded panels/png rendered panels in snapshots without login, fixes [#3769](https://github.com/grafana/grafana/pull/3769)
|
||||
* **Elasticsearch**: Fix for query template variable when looking up terms without query, no longer relies on elasticsearch default field, fixes [#3887](https://github.com/grafana/grafana/pull/3887)
|
||||
|
||||
# 3.1.2 (unreleased)
|
||||
* **Templating**: Fixed issue when combining row & panel repeats, fixes [#5790](https://github.com/grafana/grafana/issues/5790)
|
||||
|
384
Godeps/Godeps.json
generated
384
Godeps/Godeps.json
generated
@ -1,384 +0,0 @@
|
||||
{
|
||||
"ImportPath": "github.com/grafana/grafana",
|
||||
"GoVersion": "go1.5.1",
|
||||
"GodepVersion": "v60",
|
||||
"Packages": [
|
||||
"./pkg/..."
|
||||
],
|
||||
"Deps": [
|
||||
{
|
||||
"ImportPath": "github.com/BurntSushi/toml",
|
||||
"Comment": "v0.1.0-21-g056c9bc",
|
||||
"Rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Unknwon/com",
|
||||
"Rev": "d9bcf409c8a368d06c9b347705c381e7c12d54df"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/awserr",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/client",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/defaults",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/request",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/session",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/signer/v4",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/sts",
|
||||
"Comment": "v1.4.1",
|
||||
"Rev": "f80e7d0182a463dff0c0da6bbed57f21369d4346"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/benbjohnson/clock",
|
||||
"Rev": "a620c1cc9866f84a2550ad53f4f353ec030fa26b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/bmizerany/assert",
|
||||
"Comment": "release.r60-6-ge17e998",
|
||||
"Rev": "e17e99893cb6509f428e1728281c2ad60a6b31e3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/bradfitz/gomemcache/memcache",
|
||||
"Comment": "release.r60-40-g72a6864",
|
||||
"Rev": "72a68649ba712ee7c4b5b4a943a626bcd7d90eb8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/codegangsta/cli",
|
||||
"Comment": "1.2.0-187-gc31a797",
|
||||
"Rev": "c31a7975863e7810c92e2e288a9ab074f9a88f29"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/davecgh/go-spew/spew",
|
||||
"Rev": "2df174808ee097f90d259e432cc04442cf60be21"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/fatih/color",
|
||||
"Comment": "v0.1-16-g4f7bcef",
|
||||
"Rev": "4f7bcef27eec7925456d0c30c5e7b0408b3339be"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/franela/goreq",
|
||||
"Rev": "3ddeded65be21dacb5a2e2d0b95af9ff6862a2b5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-ini/ini",
|
||||
"Comment": "v0-48-g060d7da",
|
||||
"Rev": "060d7da055ba6ec5ea7a31f116332fe5efa04ce0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-ldap/ldap",
|
||||
"Comment": "v2.2.1",
|
||||
"Rev": "07a7330929b9ee80495c88a4439657d89c7dbd87"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/binding",
|
||||
"Rev": "2502aaf4bce3a4e6451b4610847bfb8dffdb6266"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/gzip",
|
||||
"Rev": "4938e9be6b279d8426cb1c89a6bcf7af70b0c21d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/inject",
|
||||
"Rev": "c5ab7bf3a307593cd44cb272d1a5beea473dd072"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/session",
|
||||
"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/session/memcache",
|
||||
"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/session/mysql",
|
||||
"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/session/postgres",
|
||||
"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-macaron/session/redis",
|
||||
"Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-sql-driver/mysql",
|
||||
"Comment": "v1.2-171-g267b128",
|
||||
"Rev": "267b128680c46286b9ca13475c3cca5de8f79bd7"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-stack/stack",
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "100eb0c0a9c5b306ca2fb4f165df21d80ada4b82"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-xorm/core",
|
||||
"Comment": "v0.4.4-7-g9e608f7",
|
||||
"Rev": "9e608f7330b9d16fe2818cfe731128b3f156cb9a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/go-xorm/xorm",
|
||||
"Comment": "v0.4.4-44-gf561133",
|
||||
"Rev": "f56113384f2c63dfe4cd8e768e349f1c35122b58"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gorilla/websocket",
|
||||
"Rev": "c45a635370221f34fea2d5163fd156fcb4e38e8a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gosimple/slug",
|
||||
"Rev": "8d258463b4459f161f51d6a357edacd3eef9d663"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/hashicorp/go-version",
|
||||
"Rev": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/inconshreveable/log15",
|
||||
"Comment": "v2.3-61-g20bca5a",
|
||||
"Rev": "20bca5a7a57282e241fac83ec9ea42538027f1c1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/inconshreveable/log15/term",
|
||||
"Comment": "v2.3-61-g20bca5a",
|
||||
"Rev": "20bca5a7a57282e241fac83ec9ea42538027f1c1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jmespath/go-jmespath",
|
||||
"Comment": "0.2.2",
|
||||
"Rev": "3433f3ea46d9f8019119e7dd41274e112a2359a9"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jtolds/gls",
|
||||
"Rev": "f1ac7f4f24f50328e6bc838ca4437d1612a0243c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/klauspost/compress/flate",
|
||||
"Rev": "7b02889a2005228347aef0e76beeaee564d82f8c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/klauspost/compress/gzip",
|
||||
"Rev": "7b02889a2005228347aef0e76beeaee564d82f8c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/klauspost/cpuid",
|
||||
"Rev": "349c675778172472f5e8f3a3e0fe187e302e5a10"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/klauspost/crc32",
|
||||
"Rev": "6834731faf32e62a2dd809d99fb24d1e4ae5a92d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/pretty",
|
||||
"Comment": "go.weekly.2011-12-22-27-ge6ac2fc",
|
||||
"Rev": "e6ac2fc51e89a3249e82157fa0bb7a18ef9dd5bb"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/s3",
|
||||
"Rev": "c070c8f9a8f0032d48f0d2a77d4e382788bd8a1d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/s3/s3util",
|
||||
"Rev": "c070c8f9a8f0032d48f0d2a77d4e382788bd8a1d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/text",
|
||||
"Rev": "bb797dc4fb8320488f47bf11de07a733d7233e1f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/lib/pq",
|
||||
"Comment": "go1.0-cutoff-13-g19eeca3",
|
||||
"Rev": "19eeca3e30d2577b1761db471ec130810e67f532"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/lib/pq/oid",
|
||||
"Comment": "go1.0-cutoff-13-g19eeca3",
|
||||
"Rev": "19eeca3e30d2577b1761db471ec130810e67f532"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mattn/go-colorable",
|
||||
"Rev": "9cbef7c35391cca05f15f8181dc0b18bc9736dbb"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mattn/go-isatty",
|
||||
"Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/mattn/go-sqlite3",
|
||||
"Comment": "v1.1.0-67-g7204887",
|
||||
"Rev": "7204887cf3a42df1cfaa5505dc3a3427f6dded8b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rainycape/unidecode",
|
||||
"Rev": "836ef0a715aedf08a12d595ed73ec8ed5b288cac"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/goconvey/convey",
|
||||
"Comment": "1.5.0-356-gfbc0a1c",
|
||||
"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/goconvey/convey/assertions",
|
||||
"Comment": "1.5.0-356-gfbc0a1c",
|
||||
"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/goconvey/convey/assertions/oglematchers",
|
||||
"Comment": "1.5.0-356-gfbc0a1c",
|
||||
"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/goconvey/convey/gotest",
|
||||
"Comment": "1.5.0-356-gfbc0a1c",
|
||||
"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/smartystreets/goconvey/convey/reporting",
|
||||
"Comment": "1.5.0-356-gfbc0a1c",
|
||||
"Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/streadway/amqp",
|
||||
"Rev": "150b7f24d6ad507e6026c13d85ce1f1391ac7400"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/context",
|
||||
"Rev": "972f0c5fbe4ae29e666c3f78c3ed42ae7a448b0a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2",
|
||||
"Rev": "c58fcf0ffc1c772aa2e1ee4894bc19f2649263b2"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/sys/unix",
|
||||
"Rev": "7a56174f0086b32866ebd746a794417edbc678a1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/asn1-ber.v1",
|
||||
"Comment": "v1",
|
||||
"Rev": "9eae18c3681ae3d3c677ac2b80a8fe57de45fc09"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/bufio.v1",
|
||||
"Comment": "v1",
|
||||
"Rev": "567b2bfa514e796916c4747494d6ff5132a1dfce"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/ini.v1",
|
||||
"Comment": "v0-16-g1772191",
|
||||
"Rev": "177219109c97e7920c933e21c9b25f874357b237"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/macaron.v1",
|
||||
"Rev": "1c6dd87797ae9319b4658cbd48d1d0420b279fd5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/redis.v2",
|
||||
"Comment": "v2.3.2",
|
||||
"Rev": "e6179049628164864e6e84e973cfb56335748dea"
|
||||
}
|
||||
]
|
||||
}
|
2
Godeps/_workspace/.gitignore
generated
vendored
2
Godeps/_workspace/.gitignore
generated
vendored
@ -1,2 +0,0 @@
|
||||
/pkg
|
||||
/bin
|
@ -1,5 +0,0 @@
|
||||
This directory tree is generated automatically by godep.
|
||||
|
||||
Please do not edit.
|
||||
|
||||
See https://github.com/tools/godep for more information.
|
163
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert.go
generated
vendored
163
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert.go
generated
vendored
@ -1,163 +0,0 @@
|
||||
package awstesting
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"sort"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Match is a testing helper to test for testing error by comparing expected
|
||||
// with a regular expression.
|
||||
func Match(t *testing.T, regex, expected string) {
|
||||
if !regexp.MustCompile(regex).Match([]byte(expected)) {
|
||||
t.Errorf("%q\n\tdoes not match /%s/", expected, regex)
|
||||
}
|
||||
}
|
||||
|
||||
// AssertURL verifies the expected URL is matches the actual.
|
||||
func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
|
||||
expectURL, err := url.Parse(expect)
|
||||
if err != nil {
|
||||
t.Errorf(errMsg("unable to parse expected URL", err, msgAndArgs))
|
||||
return false
|
||||
}
|
||||
actualURL, err := url.Parse(actual)
|
||||
if err != nil {
|
||||
t.Errorf(errMsg("unable to parse actual URL", err, msgAndArgs))
|
||||
return false
|
||||
}
|
||||
|
||||
equal(t, expectURL.Host, actualURL.Host, msgAndArgs...)
|
||||
equal(t, expectURL.Scheme, actualURL.Scheme, msgAndArgs...)
|
||||
equal(t, expectURL.Path, actualURL.Path, msgAndArgs...)
|
||||
|
||||
return AssertQuery(t, expectURL.Query().Encode(), actualURL.Query().Encode(), msgAndArgs...)
|
||||
}
|
||||
|
||||
// AssertQuery verifies the expect HTTP query string matches the actual.
|
||||
func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
|
||||
expectQ, err := url.ParseQuery(expect)
|
||||
if err != nil {
|
||||
t.Errorf(errMsg("unable to parse expected Query", err, msgAndArgs))
|
||||
return false
|
||||
}
|
||||
actualQ, err := url.ParseQuery(expect)
|
||||
if err != nil {
|
||||
t.Errorf(errMsg("unable to parse actual Query", err, msgAndArgs))
|
||||
return false
|
||||
}
|
||||
|
||||
// Make sure the keys are the same
|
||||
if !equal(t, queryValueKeys(expectQ), queryValueKeys(actualQ), msgAndArgs...) {
|
||||
return false
|
||||
}
|
||||
|
||||
for k, expectQVals := range expectQ {
|
||||
sort.Strings(expectQVals)
|
||||
actualQVals := actualQ[k]
|
||||
sort.Strings(actualQVals)
|
||||
equal(t, expectQVals, actualQVals, msgAndArgs...)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// AssertJSON verifies that the expect json string matches the actual.
|
||||
func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
|
||||
expectVal := map[string]interface{}{}
|
||||
if err := json.Unmarshal([]byte(expect), &expectVal); err != nil {
|
||||
t.Errorf(errMsg("unable to parse expected JSON", err, msgAndArgs...))
|
||||
return false
|
||||
}
|
||||
|
||||
actualVal := map[string]interface{}{}
|
||||
if err := json.Unmarshal([]byte(actual), &actualVal); err != nil {
|
||||
t.Errorf(errMsg("unable to parse actual JSON", err, msgAndArgs...))
|
||||
return false
|
||||
}
|
||||
|
||||
return equal(t, expectVal, actualVal, msgAndArgs...)
|
||||
}
|
||||
|
||||
// AssertXML verifies that the expect xml string matches the actual.
|
||||
func AssertXML(t *testing.T, expect, actual string, container interface{}, msgAndArgs ...interface{}) bool {
|
||||
expectVal := container
|
||||
if err := xml.Unmarshal([]byte(expect), &expectVal); err != nil {
|
||||
t.Errorf(errMsg("unable to parse expected XML", err, msgAndArgs...))
|
||||
}
|
||||
|
||||
actualVal := container
|
||||
if err := xml.Unmarshal([]byte(actual), &actualVal); err != nil {
|
||||
t.Errorf(errMsg("unable to parse actual XML", err, msgAndArgs...))
|
||||
}
|
||||
return equal(t, expectVal, actualVal, msgAndArgs...)
|
||||
}
|
||||
|
||||
// objectsAreEqual determines if two objects are considered equal.
|
||||
//
|
||||
// This function does no assertion of any kind.
|
||||
//
|
||||
// Based on github.com/stretchr/testify/assert.ObjectsAreEqual
|
||||
// Copied locally to prevent non-test build dependencies on testify
|
||||
func objectsAreEqual(expected, actual interface{}) bool {
|
||||
if expected == nil || actual == nil {
|
||||
return expected == actual
|
||||
}
|
||||
|
||||
return reflect.DeepEqual(expected, actual)
|
||||
}
|
||||
|
||||
// Equal asserts that two objects are equal.
|
||||
//
|
||||
// assert.Equal(t, 123, 123, "123 and 123 should be equal")
|
||||
//
|
||||
// Returns whether the assertion was successful (true) or not (false).
|
||||
//
|
||||
// Based on github.com/stretchr/testify/assert.Equal
|
||||
// Copied locally to prevent non-test build dependencies on testify
|
||||
func equal(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool {
|
||||
if !objectsAreEqual(expected, actual) {
|
||||
t.Errorf("Not Equal:\n\t%#v (expected)\n\t%#v (actual), %s",
|
||||
expected, actual, messageFromMsgAndArgs(msgAndArgs))
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func errMsg(baseMsg string, err error, msgAndArgs ...interface{}) string {
|
||||
message := messageFromMsgAndArgs(msgAndArgs)
|
||||
if message != "" {
|
||||
message += ", "
|
||||
}
|
||||
return fmt.Sprintf("%s%s, %v", message, baseMsg, err)
|
||||
}
|
||||
|
||||
// Based on github.com/stretchr/testify/assert.messageFromMsgAndArgs
|
||||
// Copied locally to prevent non-test build dependencies on testify
|
||||
func messageFromMsgAndArgs(msgAndArgs []interface{}) string {
|
||||
if len(msgAndArgs) == 0 || msgAndArgs == nil {
|
||||
return ""
|
||||
}
|
||||
if len(msgAndArgs) == 1 {
|
||||
return msgAndArgs[0].(string)
|
||||
}
|
||||
if len(msgAndArgs) > 1 {
|
||||
return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func queryValueKeys(v url.Values) []string {
|
||||
keys := make([]string, 0, len(v))
|
||||
for k := range v {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
return keys
|
||||
}
|
64
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert_test.go
generated
vendored
64
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/assert_test.go
generated
vendored
@ -1,64 +0,0 @@
|
||||
package awstesting_test
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/awstesting"
|
||||
)
|
||||
|
||||
func TestAssertJSON(t *testing.T) {
|
||||
cases := []struct {
|
||||
e, a string
|
||||
asserts bool
|
||||
}{
|
||||
{
|
||||
e: `{"RecursiveStruct":{"RecursiveMap":{"foo":{"NoRecurse":"foo"},"bar":{"NoRecurse":"bar"}}}}`,
|
||||
a: `{"RecursiveStruct":{"RecursiveMap":{"bar":{"NoRecurse":"bar"},"foo":{"NoRecurse":"foo"}}}}`,
|
||||
asserts: true,
|
||||
},
|
||||
}
|
||||
|
||||
for i, c := range cases {
|
||||
mockT := &testing.T{}
|
||||
if awstesting.AssertJSON(mockT, c.e, c.a) != c.asserts {
|
||||
t.Error("Assert JSON result was not expected.", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestAssertXML(t *testing.T) {
|
||||
cases := []struct {
|
||||
e, a string
|
||||
asserts bool
|
||||
container struct {
|
||||
XMLName xml.Name `xml:"OperationRequest"`
|
||||
NS string `xml:"xmlns,attr"`
|
||||
RecursiveStruct struct {
|
||||
RecursiveMap struct {
|
||||
Entries []struct {
|
||||
XMLName xml.Name `xml:"entries"`
|
||||
Key string `xml:"key"`
|
||||
Value struct {
|
||||
XMLName xml.Name `xml:"value"`
|
||||
NoRecurse string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}{
|
||||
{
|
||||
e: `<OperationRequest xmlns="https://foo/"><RecursiveStruct xmlns="https://foo/"><RecursiveMap xmlns="https://foo/"><entry xmlns="https://foo/"><key xmlns="https://foo/">foo</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">foo</NoRecurse></value></entry><entry xmlns="https://foo/"><key xmlns="https://foo/">bar</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">bar</NoRecurse></value></entry></RecursiveMap></RecursiveStruct></OperationRequest>`,
|
||||
a: `<OperationRequest xmlns="https://foo/"><RecursiveStruct xmlns="https://foo/"><RecursiveMap xmlns="https://foo/"><entry xmlns="https://foo/"><key xmlns="https://foo/">bar</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">bar</NoRecurse></value></entry><entry xmlns="https://foo/"><key xmlns="https://foo/">foo</key><value xmlns="https://foo/"><NoRecurse xmlns="https://foo/">foo</NoRecurse></value></entry></RecursiveMap></RecursiveStruct></OperationRequest>`,
|
||||
asserts: true,
|
||||
},
|
||||
}
|
||||
|
||||
for i, c := range cases {
|
||||
// mockT := &testing.T{}
|
||||
if awstesting.AssertXML(t, c.e, c.a, c.container) != c.asserts {
|
||||
t.Error("Assert XML result was not expected.", i)
|
||||
}
|
||||
}
|
||||
}
|
20
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/client.go
generated
vendored
20
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/client.go
generated
vendored
@ -1,20 +0,0 @@
|
||||
package awstesting
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/defaults"
|
||||
)
|
||||
|
||||
// NewClient creates and initializes a generic service client for testing.
|
||||
func NewClient(cfgs ...*aws.Config) *client.Client {
|
||||
info := metadata.ClientInfo{
|
||||
Endpoint: "http://endpoint",
|
||||
SigningName: "",
|
||||
}
|
||||
def := defaults.Get()
|
||||
def.Config.MergeIn(cfgs...)
|
||||
|
||||
return client.New(*def.Config, info, def.Handlers)
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
// Package s3_test runs integration tests for S3
|
||||
package s3_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
)
|
||||
|
||||
var bucketName *string
|
||||
var svc *s3.S3
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
setup()
|
||||
defer teardown() // only called if we panic
|
||||
result := m.Run()
|
||||
teardown()
|
||||
os.Exit(result)
|
||||
}
|
||||
|
||||
// Create a bucket for testing
|
||||
func setup() {
|
||||
svc = s3.New(integration.Session)
|
||||
bucketName = aws.String(
|
||||
fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID()))
|
||||
|
||||
for i := 0; i < 10; i++ {
|
||||
_, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName})
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for {
|
||||
_, err := svc.HeadBucket(&s3.HeadBucketInput{Bucket: bucketName})
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the bucket
|
||||
func teardown() {
|
||||
resp, _ := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
|
||||
for _, o := range resp.Contents {
|
||||
svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key})
|
||||
}
|
||||
svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
|
||||
}
|
||||
|
||||
func TestWriteToObject(t *testing.T) {
|
||||
_, err := svc.PutObject(&s3.PutObjectInput{
|
||||
Bucket: bucketName,
|
||||
Key: aws.String("key name"),
|
||||
Body: bytes.NewReader([]byte("hello world")),
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
resp, err := svc.GetObject(&s3.GetObjectInput{
|
||||
Bucket: bucketName,
|
||||
Key: aws.String("key name"),
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
b, _ := ioutil.ReadAll(resp.Body)
|
||||
assert.Equal(t, []byte("hello world"), b)
|
||||
}
|
||||
|
||||
func TestPresignedGetPut(t *testing.T) {
|
||||
putreq, _ := svc.PutObjectRequest(&s3.PutObjectInput{
|
||||
Bucket: bucketName,
|
||||
Key: aws.String("presigned-key"),
|
||||
})
|
||||
var err error
|
||||
|
||||
// Presign a PUT request
|
||||
var puturl string
|
||||
puturl, err = putreq.Presign(300 * time.Second)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// PUT to the presigned URL with a body
|
||||
var puthttpreq *http.Request
|
||||
buf := bytes.NewReader([]byte("hello world"))
|
||||
puthttpreq, err = http.NewRequest("PUT", puturl, buf)
|
||||
assert.NoError(t, err)
|
||||
|
||||
var putresp *http.Response
|
||||
putresp, err = http.DefaultClient.Do(puthttpreq)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 200, putresp.StatusCode)
|
||||
|
||||
// Presign a GET on the same URL
|
||||
getreq, _ := svc.GetObjectRequest(&s3.GetObjectInput{
|
||||
Bucket: bucketName,
|
||||
Key: aws.String("presigned-key"),
|
||||
})
|
||||
|
||||
var geturl string
|
||||
geturl, err = getreq.Presign(300 * time.Second)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Get the body
|
||||
var getresp *http.Response
|
||||
getresp, err = http.Get(geturl)
|
||||
assert.NoError(t, err)
|
||||
|
||||
var b []byte
|
||||
defer getresp.Body.Close()
|
||||
b, err = ioutil.ReadAll(getresp.Body)
|
||||
assert.Equal(t, "hello world", string(b))
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package s3crypto provides gucumber integration tests support.
|
||||
package s3crypto
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3crypto"
|
||||
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@s3crypto", func() {
|
||||
sess := session.New((&aws.Config{
|
||||
Region: aws.String("us-west-2"),
|
||||
}).WithLogLevel(aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors))
|
||||
encryptionClient := s3crypto.NewEncryptionClient(sess, nil, func(c *s3crypto.EncryptionClient) {
|
||||
})
|
||||
gucumber.World["encryptionClient"] = encryptionClient
|
||||
|
||||
decryptionClient := s3crypto.NewDecryptionClient(sess)
|
||||
gucumber.World["decryptionClient"] = decryptionClient
|
||||
|
||||
gucumber.World["client"] = s3.New(sess)
|
||||
})
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# language: en
|
||||
@s3crypto @client
|
||||
Feature: S3 Integration Crypto Tests
|
||||
|
||||
Scenario: Get all plaintext fixtures for symmetric masterkey aes cbc
|
||||
When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests"
|
||||
Then I decrypt each fixture against "Java" "version_2"
|
||||
And I compare the decrypted ciphertext to the plaintext
|
||||
|
||||
Scenario: Uploading Go's SDK fixtures
|
||||
When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests"
|
||||
Then I encrypt each fixture with "kms" "AWS_SDK_TEST_ALIAS" "us-west-2" and "aes_gcm"
|
||||
And upload "Go" data with folder "version_2"
|
||||
|
||||
Scenario: Get all plaintext fixtures for symmetric masterkey aes gcm
|
||||
When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests"
|
||||
Then I decrypt each fixture against "Go" "version_2"
|
||||
And I compare the decrypted ciphertext to the plaintext
|
@ -1,192 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
// Package s3crypto contains shared step definitions that are used across integration tests
|
||||
package s3crypto
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/gucumber/gucumber"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/kms"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3crypto"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.When(`^I get all fixtures for "(.+?)" from "(.+?)"$`,
|
||||
func(cekAlg, bucket string) {
|
||||
prefix := "plaintext_test_case_"
|
||||
baseFolder := "crypto_tests/" + cekAlg
|
||||
s3Client := gucumber.World["client"].(*s3.S3)
|
||||
|
||||
out, err := s3Client.ListObjects(&s3.ListObjectsInput{
|
||||
Bucket: aws.String(bucket),
|
||||
Prefix: aws.String(baseFolder + "/" + prefix),
|
||||
})
|
||||
assert.NoError(gucumber.T, err)
|
||||
|
||||
plaintexts := make(map[string][]byte)
|
||||
for _, obj := range out.Contents {
|
||||
plaintextKey := obj.Key
|
||||
ptObj, err := s3Client.GetObject(&s3.GetObjectInput{
|
||||
Bucket: aws.String(bucket),
|
||||
Key: plaintextKey,
|
||||
})
|
||||
assert.NoError(gucumber.T, err)
|
||||
caseKey := strings.TrimPrefix(*plaintextKey, baseFolder+"/"+prefix)
|
||||
plaintext, err := ioutil.ReadAll(ptObj.Body)
|
||||
assert.NoError(gucumber.T, err)
|
||||
|
||||
plaintexts[caseKey] = plaintext
|
||||
}
|
||||
gucumber.World["baseFolder"] = baseFolder
|
||||
gucumber.World["bucket"] = bucket
|
||||
gucumber.World["plaintexts"] = plaintexts
|
||||
})
|
||||
|
||||
gucumber.Then(`^I decrypt each fixture against "(.+?)" "(.+?)"$`, func(lang, version string) {
|
||||
plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
|
||||
baseFolder := gucumber.World["baseFolder"].(string)
|
||||
bucket := gucumber.World["bucket"].(string)
|
||||
prefix := "ciphertext_test_case_"
|
||||
s3Client := gucumber.World["client"].(*s3.S3)
|
||||
s3CryptoClient := gucumber.World["decryptionClient"].(*s3crypto.DecryptionClient)
|
||||
language := "language_" + lang
|
||||
|
||||
ciphertexts := make(map[string][]byte)
|
||||
for caseKey := range plaintexts {
|
||||
cipherKey := baseFolder + "/" + version + "/" + language + "/" + prefix + caseKey
|
||||
|
||||
// To get metadata for encryption key
|
||||
ctObj, err := s3Client.GetObject(&s3.GetObjectInput{
|
||||
Bucket: aws.String(bucket),
|
||||
Key: &cipherKey,
|
||||
})
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// We don't support wrap, so skip it
|
||||
if *ctObj.Metadata["X-Amz-Wrap-Alg"] != "kms" {
|
||||
continue
|
||||
}
|
||||
//masterkeyB64 := ctObj.Metadata["Masterkey"]
|
||||
//masterkey, err := base64.StdEncoding.DecodeString(*masterkeyB64)
|
||||
//assert.NoError(T, err)
|
||||
|
||||
//s3CryptoClient.Config.MasterKey = masterkey
|
||||
ctObj, err = s3CryptoClient.GetObject(&s3.GetObjectInput{
|
||||
Bucket: aws.String(bucket),
|
||||
Key: &cipherKey,
|
||||
},
|
||||
)
|
||||
assert.NoError(gucumber.T, err)
|
||||
|
||||
ciphertext, err := ioutil.ReadAll(ctObj.Body)
|
||||
assert.NoError(gucumber.T, err)
|
||||
ciphertexts[caseKey] = ciphertext
|
||||
}
|
||||
gucumber.World["ciphertexts"] = ciphertexts
|
||||
})
|
||||
|
||||
gucumber.And(`^I compare the decrypted ciphertext to the plaintext$`, func() {
|
||||
plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
|
||||
ciphertexts := gucumber.World["ciphertexts"].(map[string][]byte)
|
||||
for caseKey, ciphertext := range ciphertexts {
|
||||
assert.Equal(gucumber.T, len(plaintexts[caseKey]), len(ciphertext))
|
||||
assert.True(gucumber.T, bytes.Equal(plaintexts[caseKey], ciphertext))
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.Then(`^I encrypt each fixture with "(.+?)" "(.+?)" "(.+?)" and "(.+?)"$`, func(kek, v1, v2, cek string) {
|
||||
var handler s3crypto.CipherDataGenerator
|
||||
var builder s3crypto.ContentCipherBuilder
|
||||
switch kek {
|
||||
case "kms":
|
||||
arn, err := getAliasInformation(v1, v2)
|
||||
assert.Nil(gucumber.T, err)
|
||||
|
||||
b64Arn := base64.StdEncoding.EncodeToString([]byte(arn))
|
||||
assert.Nil(gucumber.T, err)
|
||||
gucumber.World["Masterkey"] = b64Arn
|
||||
|
||||
handler = s3crypto.NewKMSKeyGenerator(kms.New(session.New(&aws.Config{
|
||||
Region: &v2,
|
||||
})), arn)
|
||||
assert.Nil(gucumber.T, err)
|
||||
default:
|
||||
gucumber.T.Skip()
|
||||
}
|
||||
|
||||
switch cek {
|
||||
case "aes_gcm":
|
||||
builder = s3crypto.AESGCMContentCipherBuilder(handler)
|
||||
default:
|
||||
gucumber.T.Skip()
|
||||
}
|
||||
|
||||
sess := session.New(&aws.Config{
|
||||
Region: aws.String("us-west-2"),
|
||||
})
|
||||
c := s3crypto.NewEncryptionClient(sess, builder, func(c *s3crypto.EncryptionClient) {
|
||||
})
|
||||
gucumber.World["encryptionClient"] = c
|
||||
gucumber.World["cek"] = cek
|
||||
})
|
||||
|
||||
gucumber.And(`^upload "(.+?)" data with folder "(.+?)"$`, func(language, folder string) {
|
||||
c := gucumber.World["encryptionClient"].(*s3crypto.EncryptionClient)
|
||||
cek := gucumber.World["cek"].(string)
|
||||
bucket := gucumber.World["bucket"].(string)
|
||||
plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
|
||||
key := gucumber.World["Masterkey"].(string)
|
||||
for caseKey, plaintext := range plaintexts {
|
||||
input := &s3.PutObjectInput{
|
||||
Bucket: &bucket,
|
||||
Key: aws.String("crypto_tests/" + cek + "/" + folder + "/language_" + language + "/ciphertext_test_case_" + caseKey),
|
||||
Body: bytes.NewReader(plaintext),
|
||||
Metadata: map[string]*string{
|
||||
"Masterkey": &key,
|
||||
},
|
||||
}
|
||||
|
||||
_, err := c.PutObject(input)
|
||||
assert.Nil(gucumber.T, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func getAliasInformation(alias, region string) (string, error) {
|
||||
arn := ""
|
||||
svc := kms.New(session.New(&aws.Config{
|
||||
Region: ®ion,
|
||||
}))
|
||||
|
||||
truncated := true
|
||||
var marker *string
|
||||
for truncated {
|
||||
out, err := svc.ListAliases(&kms.ListAliasesInput{
|
||||
Marker: marker,
|
||||
})
|
||||
if err != nil {
|
||||
return arn, err
|
||||
}
|
||||
for _, aliasEntry := range out.Aliases {
|
||||
if *aliasEntry.AliasName == "alias/"+alias {
|
||||
return *aliasEntry.AliasArn, nil
|
||||
}
|
||||
}
|
||||
truncated = *out.Truncated
|
||||
marker = out.NextMarker
|
||||
}
|
||||
|
||||
return "", errors.New("The alias " + alias + " does not exist in your account. Please add the proper alias to a key")
|
||||
}
|
@ -1,163 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
// Package s3manager provides
|
||||
package s3manager
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3manager"
|
||||
)
|
||||
|
||||
var integBuf12MB = make([]byte, 1024*1024*12)
|
||||
var integMD512MB = fmt.Sprintf("%x", md5.Sum(integBuf12MB))
|
||||
var bucketName *string
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
setup()
|
||||
defer teardown() // only called if we panic
|
||||
result := m.Run()
|
||||
teardown()
|
||||
os.Exit(result)
|
||||
}
|
||||
|
||||
func setup() {
|
||||
// Create a bucket for testing
|
||||
svc := s3.New(integration.Session)
|
||||
bucketName = aws.String(
|
||||
fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID()))
|
||||
|
||||
for i := 0; i < 10; i++ {
|
||||
_, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName})
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for {
|
||||
_, err := svc.HeadBucket(&s3.HeadBucketInput{Bucket: bucketName})
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the bucket
|
||||
func teardown() {
|
||||
svc := s3.New(integration.Session)
|
||||
|
||||
objs, _ := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
|
||||
for _, o := range objs.Contents {
|
||||
svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key})
|
||||
}
|
||||
|
||||
uploads, _ := svc.ListMultipartUploads(&s3.ListMultipartUploadsInput{Bucket: bucketName})
|
||||
for _, u := range uploads.Uploads {
|
||||
svc.AbortMultipartUpload(&s3.AbortMultipartUploadInput{
|
||||
Bucket: bucketName,
|
||||
Key: u.Key,
|
||||
UploadId: u.UploadId,
|
||||
})
|
||||
}
|
||||
|
||||
svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
|
||||
}
|
||||
|
||||
type dlwriter struct {
|
||||
buf []byte
|
||||
}
|
||||
|
||||
func newDLWriter(size int) *dlwriter {
|
||||
return &dlwriter{buf: make([]byte, size)}
|
||||
}
|
||||
|
||||
func (d dlwriter) WriteAt(p []byte, pos int64) (n int, err error) {
|
||||
if pos > int64(len(d.buf)) {
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
written := 0
|
||||
for i, b := range p {
|
||||
if i >= len(d.buf) {
|
||||
break
|
||||
}
|
||||
d.buf[pos+int64(i)] = b
|
||||
written++
|
||||
}
|
||||
return written, nil
|
||||
}
|
||||
|
||||
func validate(t *testing.T, key string, md5value string) {
|
||||
mgr := s3manager.NewDownloader(integration.Session)
|
||||
params := &s3.GetObjectInput{Bucket: bucketName, Key: &key}
|
||||
|
||||
w := newDLWriter(1024 * 1024 * 20)
|
||||
n, err := mgr.Download(w, params)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, md5value, fmt.Sprintf("%x", md5.Sum(w.buf[0:n])))
|
||||
}
|
||||
|
||||
func TestUploadConcurrently(t *testing.T) {
|
||||
key := "12mb-1"
|
||||
mgr := s3manager.NewUploader(integration.Session)
|
||||
out, err := mgr.Upload(&s3manager.UploadInput{
|
||||
Bucket: bucketName,
|
||||
Key: &key,
|
||||
Body: bytes.NewReader(integBuf12MB),
|
||||
})
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, "", out.UploadID)
|
||||
assert.Regexp(t, `^https?://.+/`+key+`$`, out.Location)
|
||||
|
||||
validate(t, key, integMD512MB)
|
||||
}
|
||||
|
||||
func TestUploadFailCleanup(t *testing.T) {
|
||||
svc := s3.New(integration.Session)
|
||||
|
||||
// Break checksum on 2nd part so it fails
|
||||
part := 0
|
||||
svc.Handlers.Build.PushBack(func(r *request.Request) {
|
||||
if r.Operation.Name == "UploadPart" {
|
||||
if part == 1 {
|
||||
r.HTTPRequest.Header.Set("X-Amz-Content-Sha256", "000")
|
||||
}
|
||||
part++
|
||||
}
|
||||
})
|
||||
|
||||
key := "12mb-leave"
|
||||
mgr := s3manager.NewUploaderWithClient(svc, func(u *s3manager.Uploader) {
|
||||
u.LeavePartsOnError = false
|
||||
})
|
||||
_, err := mgr.Upload(&s3manager.UploadInput{
|
||||
Bucket: bucketName,
|
||||
Key: &key,
|
||||
Body: bytes.NewReader(integBuf12MB),
|
||||
})
|
||||
assert.Error(t, err)
|
||||
assert.NotContains(t, err.Error(), "MissingRegion")
|
||||
uploadID := ""
|
||||
if merr, ok := err.(s3manager.MultiUploadFailure); ok {
|
||||
uploadID = merr.UploadID()
|
||||
}
|
||||
assert.NotEmpty(t, uploadID)
|
||||
|
||||
_, err = svc.ListParts(&s3.ListPartsInput{
|
||||
Bucket: bucketName, Key: &key, UploadId: &uploadID})
|
||||
assert.Error(t, err)
|
||||
}
|
@ -1 +0,0 @@
|
||||
package s3manager
|
@ -1 +0,0 @@
|
||||
package s3
|
44
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
generated
vendored
44
Godeps/_workspace/src/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
generated
vendored
@ -1,44 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
// Package integration performs initialization and validation for integration
|
||||
// tests.
|
||||
package integration
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
)
|
||||
|
||||
// Session is a shared session for all integration tests to use.
|
||||
var Session = session.Must(session.NewSession())
|
||||
|
||||
func init() {
|
||||
logLevel := Session.Config.LogLevel
|
||||
if os.Getenv("DEBUG") != "" {
|
||||
logLevel = aws.LogLevel(aws.LogDebug)
|
||||
}
|
||||
if os.Getenv("DEBUG_SIGNING") != "" {
|
||||
logLevel = aws.LogLevel(aws.LogDebugWithSigning)
|
||||
}
|
||||
if os.Getenv("DEBUG_BODY") != "" {
|
||||
logLevel = aws.LogLevel(aws.LogDebugWithSigning | aws.LogDebugWithHTTPBody)
|
||||
}
|
||||
Session.Config.LogLevel = logLevel
|
||||
|
||||
if aws.StringValue(Session.Config.Region) == "" {
|
||||
panic("AWS_REGION must be configured to run integration tests")
|
||||
}
|
||||
}
|
||||
|
||||
// UniqueID returns a unique UUID-like identifier for use in generating
|
||||
// resources for integration tests.
|
||||
func UniqueID() string {
|
||||
uuid := make([]byte, 16)
|
||||
io.ReadFull(rand.Reader, uuid)
|
||||
return fmt.Sprintf("%x", uuid)
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#language en
|
||||
@acm @client
|
||||
Feature: AWS Certificate Manager
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListCertificates" API
|
||||
Then the request should be successful
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetCertificate" API with:
|
||||
| CertificateArn | arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message not be empty
|
||||
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package acm provides gucumber integration tests support.
|
||||
package acm
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/acm"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@acm", func() {
|
||||
gucumber.World["client"] = acm.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@apigateway @client
|
||||
Feature: Amazon API Gateway
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "GetAccountRequest" API
|
||||
Then the request should be successful
|
||||
|
||||
Scenario: Handing errors
|
||||
When I attempt to call the "GetRestApi" API with:
|
||||
| RestApiId | api123 |
|
||||
Then I expect the response error code to be "NotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Invalid REST API identifier specified
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package apigateway provides gucumber integration tests support.
|
||||
package apigateway
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/apigateway"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@apigateway", func() {
|
||||
gucumber.World["client"] = apigateway.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
#language en
|
||||
@applicationdiscoveryservice @client
|
||||
Feature: AWS Application Discovery Service
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeAgents" API
|
||||
Then the request should be successful
|
||||
|
@ -1,19 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package applicationdiscoveryservice provides gucumber integration tests support.
|
||||
package applicationdiscoveryservice
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@applicationdiscoveryservice", func() {
|
||||
gucumber.World["client"] = applicationdiscoveryservice.New(
|
||||
smoke.Session, &aws.Config{Region: aws.String("us-west-2")},
|
||||
)
|
||||
})
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# language: en
|
||||
@autoscaling @client
|
||||
Feature: Auto Scaling
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeScalingProcessTypes" API
|
||||
Then the value at "Processes" should be a list
|
||||
|
||||
Scenario: Handing errors
|
||||
When I attempt to call the "CreateLaunchConfiguration" API with:
|
||||
| LaunchConfigurationName | |
|
||||
| ImageId | ami-12345678 |
|
||||
| InstanceType | m1.small |
|
||||
Then I expect the response error code to be "InvalidParameter"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
LaunchConfigurationName
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package autoscaling provides gucumber integration tests support.
|
||||
package autoscaling
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/autoscaling"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@autoscaling", func() {
|
||||
gucumber.World["client"] = autoscaling.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudformation provides gucumber integration tests support.
|
||||
package cloudformation
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudformation"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudformation", func() {
|
||||
gucumber.World["client"] = cloudformation.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# language: en
|
||||
@cloudformation @client
|
||||
Feature: AWS CloudFormation
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListStacks" API
|
||||
Then the value at "StackSummaries" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "CreateStack" API with:
|
||||
| StackName | fakestack |
|
||||
| TemplateURL | http://s3.amazonaws.com/foo/bar |
|
||||
Then I expect the response error code to be "ValidationError"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
TemplateURL must reference a valid S3 object to which you have access.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudfront provides gucumber integration tests support.
|
||||
package cloudfront
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudfront"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudfront", func() {
|
||||
gucumber.World["client"] = cloudfront.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# language: en
|
||||
@cloudfront @client
|
||||
Feature: Amazon CloudFront
|
||||
|
||||
Scenario: Making a basic request
|
||||
When I call the "ListDistributions" API with:
|
||||
| MaxItems | 1 |
|
||||
Then the value at "DistributionList.Items" should be a list
|
||||
|
||||
Scenario: Error handling
|
||||
When I attempt to call the "GetDistribution" API with:
|
||||
| Id | fake-id |
|
||||
Then I expect the response error code to be "NoSuchDistribution"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
The specified distribution does not exist.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudhsm provides gucumber integration tests support.
|
||||
package cloudhsm
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudhsm"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudhsm", func() {
|
||||
gucumber.World["client"] = cloudhsm.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@cloudhsm @client
|
||||
Feature: Amazon CloudHSM
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListHapgs" API
|
||||
Then the value at "HapgList" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeHapg" API with:
|
||||
| HapgArn | bogus-arn |
|
||||
Then I expect the response error code to be "ValidationException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Value 'bogus-arn' at 'hapgArn' failed to satisfy constraint
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudsearch provides gucumber integration tests support.
|
||||
package cloudsearch
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearch"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudsearch", func() {
|
||||
gucumber.World["client"] = cloudsearch.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@cloudsearch @client
|
||||
Feature: Amazon CloudSearch
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeDomains" API
|
||||
Then the response should contain a "DomainStatusList"
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeIndexFields" API with:
|
||||
| DomainName | fakedomain |
|
||||
Then I expect the response error code to be "ResourceNotFound"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Domain not found: fakedomain
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudtrail provides gucumber integration tests support.
|
||||
package cloudtrail
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudtrail"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudtrail", func() {
|
||||
gucumber.World["client"] = cloudtrail.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@cloudtrail @client
|
||||
Feature: AWS CloudTrail
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeTrails" API
|
||||
Then the response should contain a "trailList"
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DeleteTrail" API with:
|
||||
| Name | faketrail |
|
||||
Then I expect the response error code to be "TrailNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Unknown trail
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudwatch provides gucumber integration tests support.
|
||||
package cloudwatch
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatch"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudwatch", func() {
|
||||
gucumber.World["client"] = cloudwatch.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
# language: en
|
||||
@cloudwatch @monitoring @client
|
||||
Feature: Amazon CloudWatch
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListMetrics" API with:
|
||||
| Namespace | AWS/EC2 |
|
||||
Then the value at "Metrics" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "SetAlarmState" API with:
|
||||
| AlarmName | abc |
|
||||
| StateValue | mno |
|
||||
| StateReason | xyz |
|
||||
Then I expect the response error code to be "ValidationError"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
failed to satisfy constraint
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudwatchlogs provides gucumber integration tests support.
|
||||
package cloudwatchlogs
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudwatchlogs", func() {
|
||||
gucumber.World["client"] = cloudwatchlogs.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# language: en
|
||||
@cloudwatchlogs @logs
|
||||
Feature: Amazon CloudWatch Logs
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeLogGroups" API
|
||||
Then the value at "logGroups" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetLogEvents" API with:
|
||||
| logGroupName | fakegroup |
|
||||
| logStreamName | fakestream |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
The specified log group does not exist.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package codecommit provides gucumber integration tests support.
|
||||
package codecommit
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/codecommit"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@codecommit", func() {
|
||||
gucumber.World["client"] = codecommit.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@codecommit @client
|
||||
Feature: Amazon CodeCommit
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListRepositories" API
|
||||
Then the value at "repositories" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "ListBranches" API with:
|
||||
| repositoryName | fake-repo |
|
||||
Then I expect the response error code to be "RepositoryDoesNotExistException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
fake-repo does not exist
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package codedeploy provides gucumber integration tests support.
|
||||
package codedeploy
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/codedeploy"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@codedeploy", func() {
|
||||
gucumber.World["client"] = codedeploy.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@codedeploy @client
|
||||
Feature: Amazon CodeDeploy
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListApplications" API
|
||||
Then the value at "applications" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetDeployment" API with:
|
||||
| deploymentId | d-USUAELQEX |
|
||||
Then I expect the response error code to be "DeploymentDoesNotExistException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
The deployment d-USUAELQEX could not be found
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package codepipeline provides gucumber integration tests support.
|
||||
package codepipeline
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/codepipeline"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@codepipeline", func() {
|
||||
gucumber.World["client"] = codepipeline.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@codepipeline @client
|
||||
Feature: Amazon CodePipeline
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListPipelines" API
|
||||
Then the value at "pipelines" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetPipeline" API with:
|
||||
| name | fake-pipeline |
|
||||
Then I expect the response error code to be "PipelineNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
does not have a pipeline with name 'fake-pipeline'
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cognitoidentity provides gucumber integration tests support.
|
||||
package cognitoidentity
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cognitoidentity"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cognitoidentity", func() {
|
||||
gucumber.World["client"] = cognitoidentity.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
# language: en
|
||||
@cognitoidentity @client
|
||||
Feature: Amazon Cognito Idenity
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListIdentityPools" API with JSON:
|
||||
"""
|
||||
{"MaxResults": 10}
|
||||
"""
|
||||
Then the value at "IdentityPools" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeIdentityPool" API with:
|
||||
| IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package cognitosync provides gucumber integration tests support.
|
||||
package cognitosync
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cognitosync"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cognitosync", func() {
|
||||
gucumber.World["client"] = cognitosync.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@cognitosync @client
|
||||
Feature: Amazon Cognito Sync
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListIdentityPoolUsage" API
|
||||
Then the value at "IdentityPoolUsages" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeIdentityPoolUsage" API with:
|
||||
| IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package configservice provides gucumber integration tests support.
|
||||
package configservice
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/configservice"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@configservice", func() {
|
||||
gucumber.World["client"] = configservice.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# language: en
|
||||
@configservice @config @client
|
||||
Feature: AWS Config
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeConfigurationRecorders" API
|
||||
Then the value at "ConfigurationRecorders" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetResourceConfigHistory" API with:
|
||||
| resourceType | fake-type |
|
||||
| resourceId | fake-id |
|
||||
Then I expect the response error code to be "ValidationException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
failed to satisfy constraint
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package datapipeline provides gucumber integration tests support.
|
||||
package datapipeline
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/datapipeline"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@datapipeline", func() {
|
||||
gucumber.World["client"] = datapipeline.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@datapipeline @client
|
||||
Feature: AWS Data Pipeline
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListPipelines" API
|
||||
Then the response should contain a "pipelineIdList"
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetPipelineDefinition" API with:
|
||||
| pipelineId | fake-id |
|
||||
Then I expect the response error code to be "PipelineNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
does not exist
|
||||
"""
|
@ -1,19 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package devicefarm provides gucumber integration tests support.
|
||||
package devicefarm
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/devicefarm"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@devicefarm", func() {
|
||||
// FIXME remove custom region
|
||||
gucumber.World["client"] = devicefarm.New(smoke.Session,
|
||||
aws.NewConfig().WithRegion("us-west-2"))
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@devicefarm @client
|
||||
Feature: AWS Device Farm
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListDevices" API
|
||||
Then the value at "devices" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetDevice" API with:
|
||||
| arn | arn:aws:devicefarm:us-west-2::device:000000000000000000000000fake-arn |
|
||||
Then I expect the response error code to be "NotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
No device was found for arn
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package directconnect provides gucumber integration tests support.
|
||||
package directconnect
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/directconnect"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@directconnect", func() {
|
||||
gucumber.World["client"] = directconnect.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@directconnect @client
|
||||
Feature: AWS Direct Connect
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeConnections" API
|
||||
Then the value at "connections" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeConnections" API with:
|
||||
| connectionId | fake-connection |
|
||||
Then I expect the response error code to be "DirectConnectClientException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Connection ID fake-connection has an invalid format
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package directoryservice provides gucumber integration tests support.
|
||||
package directoryservice
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/directoryservice"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@directoryservice", func() {
|
||||
gucumber.World["client"] = directoryservice.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# language: en
|
||||
@directoryservice @ds @client
|
||||
Feature: AWS Directory Service
|
||||
|
||||
I want to use AWS Directory Service
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeDirectories" API
|
||||
Then the value at "DirectoryDescriptions" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "CreateDirectory" API with:
|
||||
| Name | |
|
||||
| Password | |
|
||||
| Size | |
|
||||
Then I expect the response error code to be "ValidationException"
|
||||
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package dynamodb provides gucumber integration tests support.
|
||||
package dynamodb
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@dynamodb", func() {
|
||||
gucumber.World["client"] = dynamodb.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
# language: en
|
||||
@dynamodb @client
|
||||
Feature: Amazon DynamoDB
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListTables" API with JSON:
|
||||
"""
|
||||
{"Limit": 1}
|
||||
"""
|
||||
Then the value at "TableNames" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeTable" API with:
|
||||
| TableName | fake-table |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Requested resource not found: Table: fake-table not found
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package dynamodbstreams provides gucumber integration tests support.
|
||||
package dynamodbstreams
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/dynamodbstreams"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@dynamodbstreams", func() {
|
||||
gucumber.World["client"] = dynamodbstreams.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@dynamodbstreams @client
|
||||
Feature: Amazon DynamoDB Streams
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListStreams" API
|
||||
Then the value at "Streams" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeStream" API with:
|
||||
| StreamArn | fake-stream |
|
||||
Then I expect the response error code to be "InvalidParameter"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
StreamArn
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package ec2 provides gucumber integration tests support.
|
||||
package ec2
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@ec2", func() {
|
||||
gucumber.World["client"] = ec2.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# language: en
|
||||
@ec2 @client
|
||||
Feature: Amazon Elastic Compute Cloud
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeRegions" API
|
||||
Then the value at "Regions" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeInstances" API with JSON:
|
||||
"""
|
||||
{"InstanceIds": ["i-12345678"]}
|
||||
"""
|
||||
Then I expect the response error code to be "InvalidInstanceID.NotFound"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
The instance ID 'i-12345678' does not exist
|
||||
"""
|
@ -1,19 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package ecs provides gucumber integration tests support.
|
||||
package ecs
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/ecs"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@ecs", func() {
|
||||
// FIXME remove custom region
|
||||
gucumber.World["client"] = ecs.New(smoke.Session,
|
||||
aws.NewConfig().WithRegion("us-west-2"))
|
||||
})
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# language: en
|
||||
@ecs @client
|
||||
Feature: Amazon ECS
|
||||
|
||||
I want to use Amazon ECS
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListClusters" API
|
||||
Then the value at "clusterArns" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "StopTask" API with:
|
||||
| task | xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx |
|
||||
Then the error code should be "ClusterNotFoundException"
|
@ -1,19 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package efs provides gucumber integration tests support.
|
||||
package efs
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/efs"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@efs", func() {
|
||||
// FIXME remove custom region
|
||||
gucumber.World["client"] = efs.New(smoke.Session,
|
||||
aws.NewConfig().WithRegion("us-west-2"))
|
||||
})
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# language: en
|
||||
@efs @elasticfilesystem @client
|
||||
Feature: Amazon Elastic File System
|
||||
|
||||
I want to use Amazon Elastic File System
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeFileSystems" API
|
||||
Then the value at "FileSystems" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DeleteFileSystem" API with:
|
||||
| FileSystemId | fake-id |
|
||||
Then the error code should be "BadRequest"
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package elasticache provides gucumber integration tests support.
|
||||
package elasticache
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/elasticache"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@elasticache", func() {
|
||||
gucumber.World["client"] = elasticache.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@elasticache @client
|
||||
Feature: ElastiCache
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeEvents" API
|
||||
Then the value at "Events" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeCacheClusters" API with:
|
||||
| CacheClusterId | fake_cluster |
|
||||
Then I expect the response error code to be "InvalidParameterValue"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
The parameter CacheClusterIdentifier is not a valid identifier.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package elasticbeanstalk provides gucumber integration tests support.
|
||||
package elasticbeanstalk
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/elasticbeanstalk"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@elasticbeanstalk", func() {
|
||||
gucumber.World["client"] = elasticbeanstalk.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@elasticbeanstalk @client
|
||||
Feature: AWS Elastic Beanstalk
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListAvailableSolutionStacks" API
|
||||
Then the value at "SolutionStacks" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeEnvironmentResources" API with:
|
||||
| EnvironmentId | fake_environment |
|
||||
Then I expect the response error code to be "InvalidParameterValue"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
No Environment found for EnvironmentId = 'fake_environment'.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package elasticloadbalancing provides gucumber integration tests support.
|
||||
package elasticloadbalancing
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/elb"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@elasticloadbalancing", func() {
|
||||
gucumber.World["client"] = elb.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# language: en
|
||||
@elasticloadbalancing @client
|
||||
Feature: Elastic Load Balancing
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeLoadBalancers" API
|
||||
Then the value at "LoadBalancerDescriptions" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeLoadBalancers" API with JSON:
|
||||
"""
|
||||
{"LoadBalancerNames": ["fake_load_balancer"]}
|
||||
"""
|
||||
Then I expect the response error code to be "ValidationError"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
LoadBalancer name cannot contain characters that are not letters, or digits or the dash.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package elastictranscoder provides gucumber integration tests support.
|
||||
package elastictranscoder
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/elastictranscoder"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@elastictranscoder", func() {
|
||||
gucumber.World["client"] = elastictranscoder.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@elastictranscoder @client
|
||||
Feature: Amazon Elastic Transcoder
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListPresets" API
|
||||
Then the value at "Presets" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "ReadJob" API with:
|
||||
| Id | fake_job |
|
||||
Then I expect the response error code to be "ValidationException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Value 'fake_job' at 'id' failed to satisfy constraint
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package emr provides gucumber integration tests support.
|
||||
package emr
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/emr"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@emr", func() {
|
||||
gucumber.World["client"] = emr.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@emr @client @elasticmapreduce
|
||||
Feature: Amazon EMR
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListClusters" API
|
||||
Then the value at "Clusters" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeCluster" API with:
|
||||
| ClusterId | fake_cluster |
|
||||
Then I expect the response error code to be "InvalidRequestException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Cluster id 'fake_cluster' is not valid.
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package es provides gucumber integration tests support.
|
||||
package es
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/elasticsearchservice"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@es", func() {
|
||||
gucumber.World["client"] = elasticsearchservice.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@es @elasticsearchservice
|
||||
Feature: Amazon ElasticsearchService
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListDomainNames" API
|
||||
Then the value at "DomainNames" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeElasticsearchDomain" API with:
|
||||
| DomainName | not-a-domain |
|
||||
Then the error code should be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Domain not found: not-a-domain
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package glacier provides gucumber integration tests support.
|
||||
package glacier
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/glacier"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@glacier", func() {
|
||||
gucumber.World["client"] = glacier.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@glacier @client
|
||||
Feature: Amazon Glacier
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListVaults" API
|
||||
Then the response should contain a "VaultList"
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "ListVaults" API with:
|
||||
| accountId | abcmnoxyz |
|
||||
Then I expect the response error code to be "UnrecognizedClientException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
No account found for the given parameters
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package iam provides gucumber integration tests support.
|
||||
package iam
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/iam"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@iam", func() {
|
||||
gucumber.World["client"] = iam.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@iam @client
|
||||
Feature: AWS Identity and Access Management
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListUsers" API
|
||||
Then the value at "Users" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetUser" API with:
|
||||
| UserName | fake_user |
|
||||
Then I expect the response error code to be "NoSuchEntity"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
The user with name fake_user cannot be found.
|
||||
"""
|
@ -1,26 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package iotdataplane provides gucumber integration tests support.
|
||||
package iotdataplane
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/iot"
|
||||
"github.com/aws/aws-sdk-go/service/iotdataplane"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@iotdataplane", func() {
|
||||
svc := iot.New(smoke.Session)
|
||||
result, err := svc.DescribeEndpoint(&iot.DescribeEndpointInput{})
|
||||
if err != nil {
|
||||
gucumber.World["error"] = err
|
||||
return
|
||||
}
|
||||
|
||||
gucumber.World["client"] = iotdataplane.New(smoke.Session, aws.NewConfig().
|
||||
WithEndpoint(*result.EndpointAddress))
|
||||
})
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
# language: en
|
||||
@iotdataplane @client
|
||||
Feature: AWS IoT Data Plane
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetThingShadow" API with:
|
||||
| ThingName | "fakeThing" |
|
||||
Then I expect the response error code to be "InvalidRequestException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Invalid thing name
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package kinesis provides gucumber integration tests support.
|
||||
package kinesis
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/kinesis"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@kinesis", func() {
|
||||
gucumber.World["client"] = kinesis.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@kinesis @client
|
||||
Feature: AWS Kinesis
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListStreams" API
|
||||
Then the value at "StreamNames" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeStream" API with:
|
||||
| StreamName | bogus-stream-name |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Stream bogus-stream-name under account
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package kms provides gucumber integration tests support.
|
||||
package kms
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/kms"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@kms", func() {
|
||||
gucumber.World["client"] = kms.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
# language: en
|
||||
@kms @client
|
||||
Feature: Amazon Key Management Service
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListAliases" API
|
||||
Then the value at "Aliases" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "GetKeyPolicy" API with:
|
||||
| KeyId | fake-key |
|
||||
| PolicyName | fakepolicy |
|
||||
Then I expect the response error code to be "NotFoundException"
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package lambda provides gucumber integration tests support.
|
||||
package lambda
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/lambda"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@lambda", func() {
|
||||
gucumber.World["client"] = lambda.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@lambda @client
|
||||
Feature: Amazon Lambda
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListFunctions" API
|
||||
Then the value at "Functions" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "Invoke" API with:
|
||||
| FunctionName | bogus-function |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Function not found
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package machinelearning provides gucumber integration tests support.
|
||||
package machinelearning
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/machinelearning"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@machinelearning", func() {
|
||||
gucumber.World["client"] = machinelearning.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# language: en
|
||||
@machinelearning @client
|
||||
Feature: Amazon Machine Learning
|
||||
|
||||
I want to use Amazon Machine Learning
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeMLModels" API
|
||||
Then the value at "Results" should be a list
|
||||
|
||||
Scenario: Error handling
|
||||
When I attempt to call the "GetBatchPrediction" API with:
|
||||
| BatchPredictionId | fake-id |
|
||||
Then the error code should be "ResourceNotFoundException"
|
||||
And the error message should contain:
|
||||
"""
|
||||
No BatchPrediction with id fake-id exists
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package opsworks provides gucumber integration tests support.
|
||||
package opsworks
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/opsworks"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@opsworks", func() {
|
||||
gucumber.World["client"] = opsworks.New(smoke.Session)
|
||||
})
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# language: en
|
||||
@opsworks @client
|
||||
Feature: AWS OpsWorks
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeStacks" API
|
||||
Then the value at "Stacks" should be a list
|
||||
|
||||
Scenario: Handling errors
|
||||
When I attempt to call the "DescribeLayers" API with:
|
||||
| StackId | fake_stack |
|
||||
Then I expect the response error code to be "ResourceNotFoundException"
|
||||
And I expect the response error message to include:
|
||||
"""
|
||||
Unable to find stack with ID fake_stack
|
||||
"""
|
@ -1,16 +0,0 @@
|
||||
// +build integration
|
||||
|
||||
//Package rds provides gucumber integration tests support.
|
||||
package rds
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/rds"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@rds", func() {
|
||||
gucumber.World["client"] = rds.New(smoke.Session)
|
||||
})
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user