@@ -619,38 +619,38 @@ func TestGetHostZoneID(t *testing.T) {
619
619
{
620
620
name : "no zone" ,
621
621
zones : []string {},
622
- hostname : "example.com" ,
622
+ hostname : "example.com. " ,
623
623
want : "" ,
624
624
},
625
625
{
626
626
name : "one mismatched zone" ,
627
627
zones : []string {"foo.com." },
628
- hostname : "example.com" ,
628
+ hostname : "example.com. " ,
629
629
want : "" ,
630
630
},
631
631
{
632
632
name : "one matching zone" ,
633
- zones : []string {"example.com" },
634
- hostname : "example.com" ,
635
- want : "example.com" ,
633
+ zones : []string {"example.com. " },
634
+ hostname : "example.com. " ,
635
+ want : "example.com. " ,
636
636
},
637
637
{
638
638
name : "one matching zone, multiple mismatched ones" ,
639
- zones : []string {"example.com" , "foo.com" , "bar.com" },
640
- hostname : "example.com" ,
641
- want : "example.com" ,
639
+ zones : []string {"example.com. " , "foo.com. " , "bar.com. " },
640
+ hostname : "example.com. " ,
641
+ want : "example.com. " ,
642
642
},
643
643
{
644
644
name : "should use longer of two matching zones" ,
645
- zones : []string {"example.com" , "test.example.com" },
646
- hostname : "foo.test.example.com" ,
647
- want : "test.example.com" ,
645
+ zones : []string {"example.com. " , "test.example.com. " },
646
+ hostname : "foo.test.example.com. " ,
647
+ want : "test.example.com. " ,
648
648
},
649
649
{
650
650
name : "should not match on suffix" ,
651
- zones : []string {"example.com" , "test.example.com" },
652
- hostname : "first-test.example.com" ,
653
- want : "example.com" ,
651
+ zones : []string {"example.com. " , "test.example.com. " },
652
+ hostname : "first-test.example.com. " ,
653
+ want : "example.com. " ,
654
654
},
655
655
}
656
656
0 commit comments