Skip to content

Commit

Permalink
uncomment xmlns attr addition for putBucketAccelerateConfigration ope…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
skotambkar committed Oct 27, 2020
1 parent 96398b8 commit d27ee99
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
64 changes: 62 additions & 2 deletions service/internal/integrationtest/route53/smoke_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build integration

package route53

import (
Expand All @@ -11,6 +9,8 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/internal/integrationtest"
"github.com/aws/aws-sdk-go-v2/service/route53"
"github.com/aws/aws-sdk-go-v2/service/route53/types"

"github.com/awslabs/smithy-go"
)

Expand Down Expand Up @@ -60,3 +60,63 @@ func TestInteg_01_GetHostedZone(t *testing.T) {
t.Errorf("expect non-empty error message")
}
}

func TestInteg_02_ChangeResourceRecordSets(t *testing.T) {
cases := map[string]struct {
action types.ChangeAction
}{
"Create": {
action: types.ChangeActionCreate,
},
"Upsert": {
action: types.ChangeActionUpsert,
},
"Delete": {
action: types.ChangeActionDelete,
},
}

for name, c := range cases {
t.Run(name, func(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()

cfg, err := integrationtest.LoadConfigWithDefaultRegion("us-east-1")
if err != nil {
t.Fatalf("failed to load config, %v", err)
}

client := route53.NewFromConfig(cfg)

zoneID := "Z0985815JOOYDBSVBJT6"
params := &route53.ChangeResourceRecordSetsInput{
ChangeBatch: &types.ChangeBatch{
Changes: []*types.Change{
{
Action: c.action,
ResourceRecordSet: &types.ResourceRecordSet{
Name: aws.String("mockname"),
ResourceRecords: []*types.ResourceRecord{
{
Value: aws.String("127.0.0.1"),
},
},
TTL: aws.Int64(60),
Type: types.RRTypeA,
},
},
},
Comment: aws.String("Register instance"),
},
HostedZoneId: aws.String(zoneID),
}

resp, err := client.ChangeResourceRecordSets(ctx, params)
if err != nil {
t.Errorf("expect no error, got %v", err)
}

t.Fatalf("%v", resp)
})
}
}
2 changes: 1 addition & 1 deletion service/s3/serializers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d27ee99

Please sign in to comment.