Skip to content

Commit b2d5259

Browse files
committed
fix non-canonical dns names in test
1 parent dadedd4 commit b2d5259

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

internal/designate/provider/provider_test.go

+14-14
Original file line numberDiff line numberDiff line change
@@ -619,38 +619,38 @@ func TestGetHostZoneID(t *testing.T) {
619619
{
620620
name: "no zone",
621621
zones: []string{},
622-
hostname: "example.com",
622+
hostname: "example.com.",
623623
want: "",
624624
},
625625
{
626626
name: "one mismatched zone",
627627
zones: []string{"foo.com."},
628-
hostname: "example.com",
628+
hostname: "example.com.",
629629
want: "",
630630
},
631631
{
632632
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.",
636636
},
637637
{
638638
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.",
642642
},
643643
{
644644
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.",
648648
},
649649
{
650650
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.",
654654
},
655655
}
656656

0 commit comments

Comments
 (0)