...
1 package http
2
3 import (
4 "testing"
5 "reflect"
6 smithy "github.com/aws/smithy-go"
7 )
8
9
10 func TestSigV4SigningName(t *testing.T) {
11 expected := "foo"
12 var m smithy.Properties
13 SetSigV4SigningName(&m, expected)
14 actual, _ := GetSigV4SigningName(&m)
15
16 if expected != actual {
17 t.Errorf("Expect SigV4SigningName to be equivalent %s != %s", expected, actual)
18 }
19 }
20
21 func TestSigV4SigningRegion(t *testing.T) {
22 expected := "foo"
23 var m smithy.Properties
24 SetSigV4SigningRegion(&m, expected)
25 actual, _ := GetSigV4SigningRegion(&m)
26
27 if expected != actual {
28 t.Errorf("Expect SigV4SigningRegion to be equivalent %s != %s", expected, actual)
29 }
30 }
31
32 func TestSigV4ASigningName(t *testing.T) {
33 expected := "foo"
34 var m smithy.Properties
35 SetSigV4ASigningName(&m, expected)
36 actual, _ := GetSigV4ASigningName(&m)
37
38 if expected != actual {
39 t.Errorf("Expect SigV4ASigningName to be equivalent %s != %s", expected, actual)
40 }
41 }
42
43 func TestSigV4SigningRegions(t *testing.T) {
44 expected := []string{"foo", "bar"}
45 var m smithy.Properties
46 SetSigV4ASigningRegions(&m, expected)
47 actual, _ := GetSigV4ASigningRegions(&m)
48
49 if !reflect.DeepEqual(expected, actual) {
50 t.Errorf("Expect SigV4ASigningRegions to be equivalent %v != %v", expected, actual)
51 }
52 }
53
54 func TestUnsignedPayload(t *testing.T) {
55 expected := true
56 var m smithy.Properties
57 SetIsUnsignedPayload(&m, expected)
58 actual, _ := GetIsUnsignedPayload(&m)
59
60 if expected != actual {
61 t.Errorf("Expect IsUnsignedPayload to be equivalent %v != %v", expected, actual)
62 }
63 }
64
65 func TestDisableDoubleEncoding(t *testing.T) {
66 expected := true
67 var m smithy.Properties
68 SetDisableDoubleEncoding(&m, expected)
69 actual, _ := GetDisableDoubleEncoding(&m)
70
71 if expected != actual {
72 t.Errorf("Expect DisableDoubleEncoding to be equivalent %v != %v", expected, actual)
73 }
74 }
View as plain text