(t *testing.T)
| 1630 | } |
| 1631 | |
| 1632 | func TestPrefixMatch(t *testing.T) { |
| 1633 | t.Parallel() |
| 1634 | |
| 1635 | cases := []struct { |
| 1636 | s string |
| 1637 | prefix string |
| 1638 | expected int |
| 1639 | }{ |
| 1640 | {"aaaA", "aaa", matchExact}, |
| 1641 | {"AAAX", "BBB", noMatch}, |
| 1642 | {"AAAX", "aAa", matchCaseIns}, |
| 1643 | {"äÜX", "äü", matchCaseIns}, |
| 1644 | } |
| 1645 | |
| 1646 | for _, tc := range cases { |
| 1647 | ret := checkPrefixMatch(tc.s, tc.prefix) |
| 1648 | if ret != tc.expected { |
| 1649 | t.Errorf("checkPrefixMatch(%q, %q) => %v, expected %v", tc.s, tc.prefix, ret, tc.expected) |
| 1650 | } |
| 1651 | } |
| 1652 | } |
| 1653 | |
| 1654 | func TestShouldRegenerateCertificate(t *testing.T) { |
| 1655 | // Self signed certificates expiring in less than a month are errored so we |
nothing calls this directly
no test coverage detected