diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-05-12 23:56:07 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-12 23:56:07 -0400 |
commit | 38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8 (patch) | |
tree | a4fde09672192b97d453ad605b030bd5a10c5a45 /vendor/github.com/goamz/goamz/exp/sdb/sign_test.go | |
parent | 84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (diff) | |
download | chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.tar.gz chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.tar.bz2 chat-38ee83e45b4de7edf89bf9f0ef629eb4c6ad0fa8.zip |
Moving to glide
Diffstat (limited to 'vendor/github.com/goamz/goamz/exp/sdb/sign_test.go')
-rw-r--r-- | vendor/github.com/goamz/goamz/exp/sdb/sign_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/github.com/goamz/goamz/exp/sdb/sign_test.go b/vendor/github.com/goamz/goamz/exp/sdb/sign_test.go new file mode 100644 index 000000000..f45ad15e1 --- /dev/null +++ b/vendor/github.com/goamz/goamz/exp/sdb/sign_test.go @@ -0,0 +1,29 @@ +package sdb_test + +import ( + "github.com/goamz/goamz/aws" + "github.com/goamz/goamz/exp/sdb" + . "gopkg.in/check.v1" +) + +// SimpleDB ReST authentication docs: http://goo.gl/CaY81 + +var testAuth = aws.Auth{AccessKey: "access-key-id-s8eBOWuU", SecretKey: "secret-access-key-UkQjTLd9"} + +func (s *S) TestSignExampleDomainCreate(c *C) { + method := "GET" + params := map[string][]string{ + "Action": {"CreateDomain"}, + "DomainName": {"MyDomain"}, + "Timestamp": {"2011-08-20T07:23:57+12:00"}, + "Version": {"2009-04-15"}, + } + headers := map[string][]string{ + "Host": {"sdb.amazonaws.com"}, + } + sdb.Sign(testAuth, method, "", params, headers) + expected := "ot2JaeeqMRJqgAqW67hkzUlffgxdOz4RykbrECB+tDU=" + c.Assert(params["Signature"], DeepEquals, []string{expected}) +} + +// Do a few test methods which takes combinations of params |