TestTLSReloadCopy ensures server reloads expired/valid certs when new certs are copied over, one by one. And expects server to reject client requests, and vice versa.
(t *testing.T)
| 1670 | // when new certs are copied over, one by one. And expects server |
| 1671 | // to reject client requests, and vice versa. |
| 1672 | func TestTLSReloadCopy(t *testing.T) { |
| 1673 | certsDir := t.TempDir() |
| 1674 | |
| 1675 | cloneFunc := func() transport.TLSInfo { |
| 1676 | tlsInfo, terr := copyTLSFiles(integration.TestTLSInfo, certsDir) |
| 1677 | require.NoError(t, terr) |
| 1678 | return tlsInfo |
| 1679 | } |
| 1680 | replaceFunc := func() { |
| 1681 | _, err := copyTLSFiles(integration.TestTLSInfoExpired, certsDir) |
| 1682 | require.NoError(t, err) |
| 1683 | } |
| 1684 | revertFunc := func() { |
| 1685 | _, err := copyTLSFiles(integration.TestTLSInfo, certsDir) |
| 1686 | require.NoError(t, err) |
| 1687 | } |
| 1688 | testTLSReload(t, cloneFunc, replaceFunc, revertFunc, false) |
| 1689 | } |
| 1690 | |
| 1691 | // TestTLSReloadCopyIPOnly ensures server reloads expired/valid certs |
| 1692 | // when new certs are copied over, one by one. And expects server |
nothing calls this directly
no test coverage detected
searching dependent graphs…