Skip to content

Commit fe14af3

Browse files
mmoghaddam385lucix-awsAWS SDK for Go v2 automation userTianyi Wangwty-Bryant
authored
Merge upstream (#3)
* feat: sra identity&auth refactor (aws#2364) * Update API model * Update endpoints model * Update SDK's smithy-go dependency to v1.17.0 * Regenerated Clients * Release 2023-11-15 * fix trailing comment parse in properties (aws#2371) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-16 * Remove macie service * Add changelog for last commit * Merge customizations for service s3 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-17 * deprecate v4.SignHTTPRequestMiddleware (aws#2375) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-20 * fix: don't send 0 max items for object version and multipart upload paginators (aws#2380) * fix: don't expect response to be json in endpointcreds provider (aws#2381) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-21 * breakfix: convert public access block config fields to nilable like s3 (aws#2385) * Update API model * Regenerated Clients * Release 2023-11-22 * rebase to main branch * Add changelog * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-27 * Update API model * Regenerated Clients * Release 2023-11-27.2 * fix: respect functional option modifications to RetryMaxAttempts (aws#2390) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-28 * Change request compression codegen to operation level * Merge customizations for service s3 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-28.2 * fix: correct wiring of disable s3express auth toggle (aws#2394) * Change requestion compression comment * Release 2023-11-28.3 * Update golang.org/x/net dependency (aws#2391) * feat: add Options() getter to service clients (aws#2398) * Update API model * Update SDK's smithy-go dependency to v1.18.0 * Regenerated Clients * Release 2023-11-29 * regenerate sdk * Update API model * Update endpoints model * Update SDK's smithy-go dependency to v1.18.1 * Regenerated Clients * Release 2023-11-30 * fix: use region overrides in endpoint discovery (aws#2393) * Update API model * Regenerated Clients * Release 2023-11-30.2 * fix: correct wrapping of errors in authentication workflow (aws#2403) * fix: correct recognition and zeroing of cache-wrapped AnonymousCredentials (aws#2404) * Update API model * Regenerated Clients * Release 2023-12-01 * feat: add express integration test (aws#2402) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-04 * Add request compression assertion to protocol unit tests * Smithy upgrade (aws#2407) * Update API model * Regenerated Clients * Release 2023-12-05 * Restore pre-SRA optionalAuth/no-auth behaviors (aws#2410) * Update API model * Regenerated Clients * Release 2023-12-06 * Change config loading logic * regenerate partitions (aws#2415) * fix codegen ci (aws#2418) * Update API model * Update endpoints model * Update SDK's smithy-go dependency to v1.19.0 * Regenerated Clients * Release 2023-12-07 * fix: add non-vhostable buckets to path when using legacy endpoint resolver (aws#2417) * update express cache key (aws#2414) * fix: translation of ini service sections into shared config (aws#2416) * fix: reinstate presence of retryer when functional opts run but still respect max attempts set therein (aws#2420) * Update API model * Regenerated Clients * Release 2023-12-08 * Update API model * Regenerated Clients * Release 2023-12-11 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-12 * fix missing smithy-go checkout on main * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-13 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-14 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-15 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-18 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-19 * Update API model * Update endpoints model * Update partitions file * Regenerated Clients * Release 2023-12-20 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-21 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-22 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-26 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-27 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-28 * Update API model * Regenerated Clients * Release 2023-12-29 * removed incorrect description * changelog added * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-03 * Fix SRA auth trailing checksum retry bug (aws#2438) * Update API model * Regenerated Clients * Release 2024-01-04 * codegen: track upstream sigv4a trait changes (aws#2442) * Update API model * Regenerated Clients * Release 2024-01-05 * Update API model * Regenerated Clients * Release 2024-01-08 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-10 * Add smoke test traits dep Adds a dependency on smithy-smoke-test-traits in the sdk code gen package so aws service models that use the smokeTests trait won't fail to build because of unknown traits. Generated a client with a smoke test and confirmed there was no diff. Adding the dependency in the code gen package since it's the models that need the dependency, not the code generator. When smoke tests are implemented in the generator, we can add the dep there. * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-11 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-12 * Update API model * Regenerated Clients * Release 2024-01-14 * Fix signing bug in CFKVS service (aws#2452) * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-16 * Update API model * Regenerated Clients * Release 2024-01-17 * Remove invalid defaults from a few services (aws#2458) * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-18 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-19 * fix: remove invalid escaping of shared config values (aws#2461) * Update API model * Regenerated Clients * Release 2024-01-22 * Update API model * Regenerated Clients * Release 2024-01-23 * codegen: normalize adding of sigv4a config based on trait presence (aws#2465) * Update API model * Regenerated Clients * Release 2024-01-24 * Update API model * Regenerated Clients * Release 2024-01-25 * Minor GitHub workflow changes (aws#2466) * chore: a more polite closed issue message * chore: relax stale issue timing * Update API model * Regenerated Clients * Release 2024-01-26 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-29 * Update API model * Regenerated Clients * Release 2024-01-30 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-31 --------- Co-authored-by: Luc Talatinian <[email protected]> Co-authored-by: AWS SDK for Go v2 automation user <[email protected]> Co-authored-by: Tianyi Wang <[email protected]> Co-authored-by: Eren Yeager <[email protected]> Co-authored-by: Isaiah Vita <[email protected]> Co-authored-by: Luc Talatinian <[email protected]> Co-authored-by: Ran Vaknin <[email protected]> Co-authored-by: Ran Vaknin <[email protected]> Co-authored-by: Miles Ziemer <[email protected]> Co-authored-by: Miles Ziemer <[email protected]> Co-authored-by: Tom Keller <[email protected]>
1 parent 3e7abd4 commit fe14af3

File tree

20,829 files changed

+1454349
-2134374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

20,829 files changed

+1454349
-2134374
lines changed

.github/workflows/closed-issue-message.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ jobs:
1111
# These inputs are both required
1212
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1313
message: |
14-
### ⚠️COMMENT VISIBILITY WARNING⚠️
15-
Comments on closed issues are hard for our team to see.
16-
If you need more assistance, please either tag a team member or open a new issue that references this one.
17-
If you wish to keep having a conversation with other community members under this issue feel free to do so.
14+
This issue is now closed. Comments on closed issues are hard for our team to see.
15+
If you need more assistance, please open a new issue that references this one.

.github/workflows/stale_issue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
closed-for-staleness-label: closed-for-staleness
3131

3232
# Issue timing
33-
days-before-stale: 2
34-
days-before-close: 5
33+
days-before-stale: 10
34+
days-before-close: 4
3535
days-before-ancient: 36500
3636

3737
# If you don't want to mark a issue as being ancient based on a

CHANGELOG.md

Lines changed: 1228 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ LINT_IGNORE_S3MANAGER_INPUT='feature/s3/manager/upload.go:.+struct field SSEKMSK
44
# Names of these are tied to endpoint rules and they're internal so ignore them
55
LINT_IGNORE_AWSRULESFN_ARN='internal/endpoints/awsrulesfn/arn.go'
66
LINT_IGNORE_AWSRULESFN_PARTITION='internal/endpoints/awsrulesfn/partition.go'
7+
LINT_IGNORE_PRIVATE_METRICS='aws/middleware/private/metrics'
78

89
UNIT_TEST_TAGS=
910
BUILD_TAGS=-tags "example,codegen,integration,ec2env,perftest"
@@ -254,7 +255,7 @@ unit-race-modules-%:
254255
&& go run . -p $(subst _,/,$(subst unit-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
255256
"go vet ${BUILD_TAGS} --all ./..." \
256257
"go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
257-
"go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
258+
"go test -timeout=2m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
258259

259260
unit-modules-%:
260261
@# unit command that uses the pattern to define the root path that the
@@ -266,7 +267,7 @@ unit-modules-%:
266267
&& go run . -p $(subst _,/,$(subst unit-modules-,,$@)) ${EACHMODULE_FLAGS} \
267268
"go vet ${BUILD_TAGS} --all ./..." \
268269
"go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
269-
"go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
270+
"go test -timeout=2m ${UNIT_TEST_TAGS} ./..."
270271

271272
build: build-modules-.
272273

@@ -302,7 +303,7 @@ test-race-modules-%:
302303
@# e.g. test-race-modules-internal_protocoltest
303304
cd ./internal/repotools/cmd/eachmodule \
304305
&& go run . -p $(subst _,/,$(subst test-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
305-
"go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
306+
"go test -timeout=2m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
306307

307308
test-modules-%:
308309
@# Test command that uses the pattern to define the root path that the
@@ -312,7 +313,7 @@ test-modules-%:
312313
@# e.g. test-modules-internal_protocoltest
313314
cd ./internal/repotools/cmd/eachmodule \
314315
&& go run . -p $(subst _,/,$(subst test-modules-,,$@)) ${EACHMODULE_FLAGS} \
315-
"go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
316+
"go test -timeout=2m ${UNIT_TEST_TAGS} ./..."
316317

317318
cachedep: cachedep-modules-.
318319

@@ -472,7 +473,8 @@ lint:
472473
-e ${LINT_IGNORE_S3MANAGER_INPUT} \
473474
-e ${LINTIGNORESINGLEFIGHT} \
474475
-e ${LINT_IGNORE_AWSRULESFN_ARN} \
475-
-e ${LINT_IGNORE_AWSRULESFN_PARTITION}`; \
476+
-e ${LINT_IGNORE_AWSRULESFN_PARTITION} \
477+
-e ${LINT_IGNORE_PRIVATE_METRICS}`; \
476478
echo "$$dolint"; \
477479
if [ "$$dolint" != "" ]; then exit 1; fi
478480

aws/config.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ type Config struct {
150150
// BaseEndpoint is an intermediary transfer location to a service specific
151151
// BaseEndpoint on a service's Options.
152152
BaseEndpoint *string
153+
154+
// DisableRequestCompression toggles if an operation request could be
155+
// compressed or not. Will be set to false by default. This variable is sourced from
156+
// environment variable AWS_DISABLE_REQUEST_COMPRESSION or the shared config profile attribute
157+
// disable_request_compression
158+
DisableRequestCompression bool
159+
160+
// RequestMinCompressSizeBytes sets the inclusive min bytes of a request body that could be
161+
// compressed. Will be set to 10240 by default and must be within 0 and 10485760 bytes inclusively.
162+
// This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or
163+
// the shared config profile attribute request_min_compression_size_bytes
164+
RequestMinCompressSizeBytes int64
153165
}
154166

155167
// NewConfig returns a new Config pointer that can be chained with builder
@@ -158,8 +170,7 @@ func NewConfig() *Config {
158170
return &Config{}
159171
}
160172

161-
// Copy will return a shallow copy of the Config object. If any additional
162-
// configurations are provided they will be merged into the new config returned.
173+
// Copy will return a shallow copy of the Config object.
163174
func (c Config) Copy() Config {
164175
cp := c
165176
return cp

aws/go_module_metadata.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/middleware/metadata.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ func GetServiceID(ctx context.Context) (v string) {
6565
//
6666
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
6767
// to clear all stack values.
68+
//
69+
// Deprecated: This value is unstable. The resolved signing name is available
70+
// in the signer properties object passed to the signer.
6871
func GetSigningName(ctx context.Context) (v string) {
6972
v, _ = middleware.GetStackValue(ctx, signingNameKey{}).(string)
7073
return v
@@ -74,6 +77,9 @@ func GetSigningName(ctx context.Context) (v string) {
7477
//
7578
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
7679
// to clear all stack values.
80+
//
81+
// Deprecated: This value is unstable. The resolved signing region is available
82+
// in the signer properties object passed to the signer.
7783
func GetSigningRegion(ctx context.Context) (v string) {
7884
v, _ = middleware.GetStackValue(ctx, signingRegionKey{}).(string)
7985
return v
@@ -125,10 +131,13 @@ func SetRequiresLegacyEndpoints(ctx context.Context, value bool) context.Context
125131
return middleware.WithStackValue(ctx, requiresLegacyEndpointsKey{}, value)
126132
}
127133

128-
// SetSigningName set or modifies the signing name on the context.
134+
// SetSigningName set or modifies the sigv4 or sigv4a signing name on the context.
129135
//
130136
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
131137
// to clear all stack values.
138+
//
139+
// Deprecated: This value is unstable. Use WithSigV4SigningName client option
140+
// funcs instead.
132141
func SetSigningName(ctx context.Context, value string) context.Context {
133142
return middleware.WithStackValue(ctx, signingNameKey{}, value)
134143
}
@@ -137,6 +146,9 @@ func SetSigningName(ctx context.Context, value string) context.Context {
137146
//
138147
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
139148
// to clear all stack values.
149+
//
150+
// Deprecated: This value is unstable. Use WithSigV4SigningRegion client option
151+
// funcs instead.
140152
func SetSigningRegion(ctx context.Context, value string) context.Context {
141153
return middleware.WithStackValue(ctx, signingRegionKey{}, value)
142154
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// Package emf implements an EMF metrics publisher.
2+
//
3+
// This package is designated as private and is intended for use only by the
4+
// smithy client runtime. The exported API therein is not considered stable and
5+
// is subject to breaking changes without notice.
6+
package emf
7+
8+
import (
9+
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
10+
"github.com/aws/aws-sdk-go-v2/internal/sdk"
11+
)
12+
13+
const (
14+
emfIdentifier = "_aws"
15+
timestampKey = "Timestamp"
16+
cloudWatchMetricsKey = "CloudWatchMetrics"
17+
namespaceKey = "Namespace"
18+
dimensionsKey = "Dimensions"
19+
metricsKey = "Metrics"
20+
)
21+
22+
// Entry represents a log entry in the EMF format.
23+
type Entry struct {
24+
namespace string
25+
serializer metrics.Serializer
26+
metrics []metric
27+
dimensions [][]string
28+
fields map[string]interface{}
29+
}
30+
31+
type metric struct {
32+
Name string
33+
}
34+
35+
// NewEntry creates a new Entry with the specified namespace and serializer.
36+
func NewEntry(namespace string, serializer metrics.Serializer) Entry {
37+
return Entry{
38+
namespace: namespace,
39+
serializer: serializer,
40+
metrics: []metric{},
41+
dimensions: [][]string{{}},
42+
fields: map[string]interface{}{},
43+
}
44+
}
45+
46+
// Build constructs the EMF log entry as a JSON string.
47+
func (e *Entry) Build() (string, error) {
48+
49+
entry := map[string]interface{}{}
50+
51+
entry[emfIdentifier] = map[string]interface{}{
52+
timestampKey: sdk.NowTime().UnixNano() / 1e6,
53+
cloudWatchMetricsKey: []map[string]interface{}{
54+
{
55+
namespaceKey: e.namespace,
56+
dimensionsKey: e.dimensions,
57+
metricsKey: e.metrics,
58+
},
59+
},
60+
}
61+
62+
for k, v := range e.fields {
63+
entry[k] = v
64+
}
65+
66+
jsonEntry, err := e.serializer.Serialize(entry)
67+
if err != nil {
68+
return "", err
69+
}
70+
return jsonEntry, nil
71+
}
72+
73+
// AddDimension adds a CW Dimension to the EMF entry.
74+
func (e *Entry) AddDimension(key string, value string) {
75+
// Dimensions are a list of lists. We only support a single list.
76+
e.dimensions[0] = append(e.dimensions[0], key)
77+
e.fields[key] = value
78+
}
79+
80+
// AddMetric adds a CW Metric to the EMF entry.
81+
func (e *Entry) AddMetric(key string, value float64) {
82+
e.metrics = append(e.metrics, metric{key})
83+
e.fields[key] = value
84+
}
85+
86+
// AddProperty adds a CW Property to the EMF entry.
87+
// Properties are not published as metrics, but they are available in logs and in CW insights.
88+
func (e *Entry) AddProperty(key string, value interface{}) {
89+
e.fields[key] = value
90+
}
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
// This package is designated as private and is intended for use only by the
2+
// smithy client runtime. The exported API therein is not considered stable and
3+
// is subject to breaking changes without notice.
4+
5+
package emf
6+
7+
import (
8+
"fmt"
9+
"reflect"
10+
"testing"
11+
"time"
12+
13+
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
14+
"github.com/aws/aws-sdk-go-v2/internal/sdk"
15+
)
16+
17+
type TestSerializerWithError struct{}
18+
19+
func (TestSerializerWithError) Serialize(obj interface{}) (string, error) {
20+
return "", fmt.Errorf("serialization error")
21+
}
22+
23+
func TestCreateNewEntry(t *testing.T) {
24+
25+
sdk.NowTime = func() time.Time {
26+
return time.Unix(1234, 0)
27+
}
28+
29+
cases := map[string]struct {
30+
Namespace string
31+
ExpectedEntry Entry
32+
}{
33+
"success": {
34+
Namespace: "testNamespace",
35+
ExpectedEntry: Entry{
36+
namespace: "testNamespace",
37+
serializer: metrics.DefaultSerializer{},
38+
metrics: []metric{},
39+
dimensions: [][]string{{}},
40+
fields: map[string]interface{}{},
41+
},
42+
},
43+
}
44+
45+
for name, c := range cases {
46+
t.Run(name, func(t *testing.T) {
47+
actualEntry := NewEntry(c.Namespace, metrics.DefaultSerializer{})
48+
if !reflect.DeepEqual(actualEntry, c.ExpectedEntry) {
49+
t.Errorf("Entry contained unexpected values")
50+
}
51+
})
52+
}
53+
}
54+
55+
func TestBuild(t *testing.T) {
56+
57+
sdk.NowTime = func() time.Time {
58+
return time.Unix(1234, 0)
59+
}
60+
61+
cases := map[string]struct {
62+
Namespace string
63+
Configure func(entry *Entry)
64+
Serializer metrics.Serializer
65+
ExpectedError error
66+
ExpectedResult string
67+
}{
68+
"completeEntry": {
69+
Namespace: "testNamespace",
70+
Serializer: metrics.DefaultSerializer{},
71+
Configure: func(entry *Entry) {
72+
entry.AddMetric("testMetric1", 1)
73+
entry.AddMetric("testMetric2", 2)
74+
entry.AddDimension("testDimension1", "dim1")
75+
entry.AddDimension("testDimension2", "dim2")
76+
entry.AddProperty("testProperty1", "prop1")
77+
entry.AddProperty("testProperty2", "prop2")
78+
},
79+
ExpectedError: nil,
80+
ExpectedResult: completeEntry,
81+
},
82+
"noMetrics": {
83+
Namespace: "testNamespace",
84+
Serializer: metrics.DefaultSerializer{},
85+
Configure: func(entry *Entry) {
86+
entry.AddDimension("testDimension1", "dim1")
87+
entry.AddDimension("testDimension2", "dim2")
88+
entry.AddProperty("testProperty1", "prop1")
89+
entry.AddProperty("testProperty2", "prop2")
90+
},
91+
ExpectedError: nil,
92+
ExpectedResult: noMetrics,
93+
},
94+
"noDimensions": {
95+
Namespace: "testNamespace",
96+
Serializer: metrics.DefaultSerializer{},
97+
Configure: func(entry *Entry) {
98+
entry.AddMetric("testMetric1", 1)
99+
entry.AddMetric("testMetric2", 2)
100+
entry.AddProperty("testProperty1", "prop1")
101+
entry.AddProperty("testProperty2", "prop2")
102+
},
103+
ExpectedError: nil,
104+
ExpectedResult: noDimensions,
105+
},
106+
"noProperties": {
107+
Namespace: "testNamespace",
108+
Serializer: metrics.DefaultSerializer{},
109+
Configure: func(entry *Entry) {
110+
entry.AddMetric("testMetric1", 1)
111+
entry.AddMetric("testMetric2", 2)
112+
entry.AddDimension("testDimension1", "dim1")
113+
entry.AddDimension("testDimension2", "dim2")
114+
},
115+
ExpectedError: nil,
116+
ExpectedResult: noProperties,
117+
},
118+
"serializationError": {
119+
Namespace: "testNamespace",
120+
Serializer: TestSerializerWithError{},
121+
Configure: func(entry *Entry) {
122+
},
123+
ExpectedError: fmt.Errorf("serialization error"),
124+
ExpectedResult: "",
125+
},
126+
}
127+
128+
for name, c := range cases {
129+
t.Run(name, func(t *testing.T) {
130+
entry := NewEntry(c.Namespace, c.Serializer)
131+
132+
c.Configure(&entry)
133+
134+
result, err := entry.Build()
135+
136+
if !reflect.DeepEqual(err, c.ExpectedError) {
137+
t.Errorf("Unexpected error, should be '%s' but was '%s'", c.ExpectedError, err)
138+
}
139+
140+
if !reflect.DeepEqual(result, c.ExpectedResult) {
141+
t.Errorf("Unexpected result, should be '%s' but was '%s'", c.ExpectedResult, result)
142+
}
143+
})
144+
}
145+
}

0 commit comments

Comments
 (0)