Skip to content

Commit

Permalink
service/route53: Fix customization test being to specific (#3861)
Browse files Browse the repository at this point in the history
Fixes the API client's customization unit test to be less specific about
the expected URL. This change prevents unit test failures if unrelated
API model updates occur.
  • Loading branch information
jasdel authored Apr 13, 2021
1 parent a97b238 commit c9a8f65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/route53/customizations_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package route53_test

import (
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand All @@ -9,14 +10,14 @@ import (
)

func TestBuildCorrectURI(t *testing.T) {
const expectPath = "/2013-04-01/hostedzone/ABCDEFG"

svc := route53.New(unit.Session)
svc.Handlers.Validate.Clear()
req, _ := svc.GetHostedZoneRequest(&route53.GetHostedZoneInput{
Id: aws.String("/hostedzone/ABCDEFG"),
})

expectPath := strings.Replace(req.Operation.HTTPPath, "{Id}", "ABCDEFG", -1)

req.HTTPRequest.URL.RawQuery = "abc=123"

req.Build()
Expand Down

0 comments on commit c9a8f65

Please sign in to comment.