MCPcopy
hub / github.com/segmentio/kafka-go / TestDefaultSignTime

Function TestDefaultSignTime

sasl/aws_msk_iam_v2/msk_iam_test.go:133–151  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

131}
132
133func TestDefaultSignTime(t *testing.T) {
134 testCases := map[string]struct {
135 SignTime time.Time
136 }{
137 "with default": {SignTime: signTime},
138 "without default": {},
139 }
140
141 for name, testCase := range testCases {
142 t.Run(name, func(t *testing.T) {
143 actual := defaultSignTime(testCase.SignTime)
144 if testCase.SignTime.IsZero() {
145 assert.True(t, actual.After(signTime))
146 } else {
147 assert.Equal(t, signTime, actual)
148 }
149 })
150 }
151}
152
153func TestNewMechanism(t *testing.T) {
154 region := "us-east-1"

Callers

nothing calls this directly

Calls 2

defaultSignTimeFunction · 0.85
IsZeroMethod · 0.80

Tested by

no test coverage detected