github.com/mohanarpit/terraform@v0.6.16-0.20160909104007-291f29853544/builtin/providers/aws/hosted_zones_test.go (about)

     1  package aws
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestHostedZoneIDForRegion(t *testing.T) {
     8  	if r := HostedZoneIDForRegion("us-east-1"); r != "Z3AQBSTGFYJSTF" {
     9  		t.Fatalf("bad: %s", r)
    10  	}
    11  	if r := HostedZoneIDForRegion("ap-southeast-2"); r != "Z1WCIGYICN2BYD" {
    12  		t.Fatalf("bad: %s", r)
    13  	}
    14  
    15  	// Bad input should be empty string
    16  	if r := HostedZoneIDForRegion("not-a-region"); r != "" {
    17  		t.Fatalf("bad: %s", r)
    18  	}
    19  }