LEFT | RIGHT |
1 package ec2_test | 1 package ec2_test |
2 | 2 |
3 import ( | 3 import ( |
4 "launchpad.net/goamz/aws" | 4 "launchpad.net/goamz/aws" |
5 "launchpad.net/goamz/ec2" | 5 "launchpad.net/goamz/ec2" |
6 . "launchpad.net/gocheck" | 6 . "launchpad.net/gocheck" |
7 ) | 7 ) |
8 | 8 |
9 // EC2 ReST authentication docs: http://goo.gl/fQmAN | 9 // EC2 ReST authentication docs: http://goo.gl/fQmAN |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 func (s *S) TestSignatureExample1(c *C) { | 40 func (s *S) TestSignatureExample1(c *C) { |
41 params := map[string]string{ | 41 params := map[string]string{ |
42 "Timestamp": "2009-02-01T12:53:20+00:00", | 42 "Timestamp": "2009-02-01T12:53:20+00:00", |
43 "Version": "2007-11-07", | 43 "Version": "2007-11-07", |
44 "Action": "ListDomains", | 44 "Action": "ListDomains", |
45 } | 45 } |
46 ec2.Sign(aws.Auth{"access", "secret"}, "GET", "/", params, "sdb.amazonaw
s.com") | 46 ec2.Sign(aws.Auth{"access", "secret"}, "GET", "/", params, "sdb.amazonaw
s.com") |
47 expected := "okj96/5ucWBSc1uR2zXVfm6mDHtgfNv657rRtt/aunQ=" | 47 expected := "okj96/5ucWBSc1uR2zXVfm6mDHtgfNv657rRtt/aunQ=" |
48 c.Assert(params["Signature"], Equals, expected) | 48 c.Assert(params["Signature"], Equals, expected) |
49 } | 49 } |
LEFT | RIGHT |