Skip to content

Commit

Permalink
test(server): Fix tests for golang 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyno-zeta committed Feb 13, 2024
1 parent 3359f59 commit a061727
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/s3-proxy/server/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ func TestGenerateTLSConfig(t *testing.T) {
SelfSignedHostnames: []string{"localhost", "localhost.localdomain"},
MinTLSVersion: aws.String("TLSv1.1"),
MaxTLSVersion: aws.String("TLSv1.2"),
CipherSuites: []string{"TLS_RSA_WITH_AES_128_GCM_SHA256"},
CipherSuites: []string{"TLS_AES_128_GCM_SHA256"},
},
expect: expectStruct,
minVersion: aws.Uint16(tls.VersionTLS11),
maxVersion: aws.Uint16(tls.VersionTLS12),
cipherSuites: []uint16{tls.TLS_RSA_WITH_AES_128_GCM_SHA256},
cipherSuites: []uint16{tls.TLS_AES_128_GCM_SHA256},
certDNS: [][]string{{"localhost", "localhost.localdomain"}, {"testhost.example.com"}},
},
{
Expand All @@ -97,7 +97,7 @@ func TestGenerateTLSConfig(t *testing.T) {
SelfSignedHostnames: []string{"localhost", "localhost.localdomain"},
MinTLSVersion: aws.String("5.0"),
MaxTLSVersion: aws.String("TLSv1.2"),
CipherSuites: []string{"TLS_RSA_WITH_AES_128_GCM_SHA256"},
CipherSuites: []string{"TLS_AES_128_GCM_SHA256"},
},
expect: expectErr,
errorString: "invalid TLS version: 5.0",
Expand All @@ -115,7 +115,7 @@ func TestGenerateTLSConfig(t *testing.T) {
SelfSignedHostnames: []string{"localhost", "localhost.localdomain"},
MinTLSVersion: aws.String("tls1.1"),
MaxTLSVersion: aws.String("6.0"),
CipherSuites: []string{"TLS_RSA_WITH_AES_128_GCM_SHA256"},
CipherSuites: []string{"TLS_AES_128_GCM_SHA256"},
},
expect: expectErr,
errorString: "invalid TLS version: 6.0",
Expand All @@ -133,7 +133,7 @@ func TestGenerateTLSConfig(t *testing.T) {
SelfSignedHostnames: []string{"localhost", "localhost.localdomain"},
MinTLSVersion: aws.String("TLSv1.1"),
MaxTLSVersion: aws.String("TLSv1.2"),
CipherSuites: []string{"TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_NULL"},
CipherSuites: []string{"TLS_AES_128_GCM_SHA256", "TLS_NULL"},
},
expect: expectErr,
errorString: "invalid cipher suite: TLS_NULL",
Expand All @@ -150,7 +150,7 @@ func TestGenerateTLSConfig(t *testing.T) {
SelfSignedHostnames: []string{"localhost", "localhost.localdomain"},
MinTLSVersion: aws.String("TLSv1.1"),
MaxTLSVersion: aws.String("TLSv1.2"),
CipherSuites: []string{"TLS_RSA_WITH_AES_128_GCM_SHA256"},
CipherSuites: []string{"TLS_AES_128_GCM_SHA256"},
},
expect: expectErr,
errorString: "unable to load certificate: expected either certificate or certificateUrl to be set",
Expand All @@ -167,7 +167,7 @@ func TestGenerateTLSConfig(t *testing.T) {
SelfSignedHostnames: []string{"localhost", "localhost.localdomain"},
MinTLSVersion: aws.String("TLSv1.1"),
MaxTLSVersion: aws.String("TLSv1.2"),
CipherSuites: []string{"TLS_RSA_WITH_AES_128_GCM_SHA256"},
CipherSuites: []string{"TLS_AES_128_GCM_SHA256"},
},
expect: expectErr,
errorString: "unable to load certificate: expected either privateKey or privateKeyUrl to be set",
Expand Down

0 comments on commit a061727

Please # to comment.