github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/builtin/providers/aws/website_endpoint_url_test.go (about) 1 package aws 2 3 import "testing" 4 5 func TestWebsiteEndpointUrl_withoutRegion(t *testing.T) { 6 u := WebsiteEndpointUrl("buck.et", "") 7 if u != "buck.et.s3-website-us-east-1.amazonaws.com" { 8 t.Fatalf("bad: %s", u) 9 } 10 } 11 12 func TestWebsiteEndpointUrl_withRegion(t *testing.T) { 13 u := WebsiteEndpointUrl("buck.et", "us-west-1") 14 if u != "buck.et.s3-website-us-west-1.amazonaws.com" { 15 t.Fatalf("bad: %s", u) 16 } 17 }