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:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-09-06 15:13:07 +0300
committerNick Thomas <nick@gitlab.com>2019-09-06 15:13:07 +0300
commit550dd015664c7ad40fc1e1d77d41a08a2083bc53 (patch)
tree035c4a2cba2d9bfd095b493194f8fc26859fa233 /acceptance_test.go
parente52008397276437ce28bef3686df7562e281cf9d (diff)
Add golang 1.13 to the ci
Diffstat (limited to 'acceptance_test.go')
-rw-r--r--acceptance_test.go26
1 files changed, 12 insertions, 14 deletions
diff --git a/acceptance_test.go b/acceptance_test.go
index eb90dc95..b2f0c747 100644
--- a/acceptance_test.go
+++ b/acceptance_test.go
@@ -1230,18 +1230,22 @@ func TestAcceptsSupportedCiphers(t *testing.T) {
require.NoError(t, err)
}
-func TestRejectsUnsupportedCiphers(t *testing.T) {
- skipUnlessEnabled(t)
- teardown := RunPagesProcess(t, *pagesBinary, listeners, "")
- defer teardown()
-
- tlsConfig := &tls.Config{
+func tlsConfigWithInsecureCiphersOnly() *tls.Config {
+ return &tls.Config{
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA,
},
+ MaxVersion: tls.VersionTLS12, // ciphers for TLS1.3 are not configurable and will work if enabled
}
- client, cleanup := ClientWithConfig(tlsConfig)
+}
+
+func TestRejectsUnsupportedCiphers(t *testing.T) {
+ skipUnlessEnabled(t)
+ teardown := RunPagesProcess(t, *pagesBinary, listeners, "")
+ defer teardown()
+
+ client, cleanup := ClientWithConfig(tlsConfigWithInsecureCiphersOnly())
defer cleanup()
rsp, err := client.Get(httpsListener.URL("/"))
@@ -1259,13 +1263,7 @@ func TestEnableInsecureCiphers(t *testing.T) {
teardown := RunPagesProcess(t, *pagesBinary, listeners, "", "-insecure-ciphers")
defer teardown()
- tlsConfig := &tls.Config{
- CipherSuites: []uint16{
- tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
- tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA,
- },
- }
- client, cleanup := ClientWithConfig(tlsConfig)
+ client, cleanup := ClientWithConfig(tlsConfigWithInsecureCiphersOnly())
defer cleanup()
rsp, err := client.Get(httpsListener.URL("/"))