1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-10 07:00:08 +00:00
cloudkeys-go/vendor/github.com/aws/aws-sdk-go/service/route53/customizations_test.go
Knut Ahlers 7581358922
Switch to dep for vendoring, update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-12-08 13:03:10 +01:00

35 lines
833 B
Go

package route53_test
import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/route53"
)
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"),
})
req.HTTPRequest.URL.RawQuery = "abc=123"
req.Build()
if a, e := req.HTTPRequest.URL.Path, expectPath; a != e {
t.Errorf("expect path %q, got %q", e, a)
}
if a, e := req.HTTPRequest.URL.RawPath, expectPath; a != e {
t.Errorf("expect raw path %q, got %q", e, a)
}
if a, e := req.HTTPRequest.URL.RawQuery, "abc=123"; a != e {
t.Errorf("expect query to be %q, got %q", e, a)
}
}