Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Reinhart <Jonathon.Reinhart@gmail.com>2020-06-23 05:37:52 +0300
committerJonathon Reinhart <Jonathon.Reinhart@gmail.com>2020-06-30 03:31:58 +0300
commite8684587cd939bf32d9952a1d2ed3c4d288fd7e5 (patch)
tree63b02f29d7166eefebbf89168b82ccf14568ecfe /acceptance_test.go
parent2efbc0cafb4d99955c4fdb9808ea8020fc532c1d (diff)
Add SSL_CERT_DIR acceptance test
Diffstat (limited to 'acceptance_test.go')
-rw-r--r--acceptance_test.go14
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, "")