...
1 package auth
2
3 import (
4 "testing"
5 "reflect"
6 smithy "github.com/aws/smithy-go"
7 )
8
9 func TestAuthOptions(t *testing.T) {
10 var ip smithy.Properties
11 ip.Set("foo", "bar")
12
13 var sp smithy.Properties
14 sp.Set("foo", "bar")
15
16 expected := []*Option{
17 &Option{
18 SchemeID: "fakeSchemeID",
19 IdentityProperties: ip,
20 SignerProperties: sp,
21 },
22 }
23
24 var m smithy.Properties
25 SetAuthOptions(&m, expected)
26 actual, _ := GetAuthOptions(&m)
27
28 if !reflect.DeepEqual(expected, actual) {
29 t.Errorf("Expect AuthOptions to be equivalent %v != %v", expected, actual)
30 }
31 }
View as plain text