diff options
Diffstat (limited to 'acceptance_test.go')
-rw-r--r-- | acceptance_test.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/acceptance_test.go b/acceptance_test.go index 9497511a..e8f7fe1a 100644 --- a/acceptance_test.go +++ b/acceptance_test.go @@ -1243,7 +1243,9 @@ func setupTransport(t *testing.T) { transport.ResponseHeaderTimeout = 5 * time.Second } -func TestAccessControl(t *testing.T) { +type runPagesFunc func(t *testing.T, pagesPath string, listeners []ListenSpec, promPort string, sslCertFile string, authServer string) func() + +func testAccessControl(t *testing.T, runPages runPagesFunc) { skipUnlessEnabled(t, "not-inplace-chroot") setupTransport(t) @@ -1340,7 +1342,7 @@ func TestAccessControl(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - teardown := RunPagesProcessWithAuthServerWithSSL(t, *pagesBinary, listeners, "", certFile, testServer.URL) + teardown := runPages(t, *pagesBinary, listeners, "", certFile, testServer.URL) defer teardown() rsp, err := GetRedirectPage(t, httpsListener, tt.host, tt.path) @@ -1406,6 +1408,14 @@ func TestAccessControl(t *testing.T) { } } +func TestAccessControlWithSSLCertFile(t *testing.T) { + testAccessControl(t, RunPagesProcessWithAuthServerWithSSLCertFile) +} + +func TestAccessControlWithSSLCertDir(t *testing.T) { + testAccessControl(t, RunPagesProcessWithAuthServerWithSSLCertDir) +} + func TestAcceptsSupportedCiphers(t *testing.T) { skipUnlessEnabled(t) teardown := RunPagesProcess(t, *pagesBinary, listeners, "") |