From a061727c39a2ab560cac84cf4098f1ab82b3a125 Mon Sep 17 00:00:00 2001 From: Havrileck Alexandre Date: Tue, 13 Feb 2024 22:48:39 +0100 Subject: [PATCH] test(server): Fix tests for golang 1.22 --- pkg/s3-proxy/server/tls_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/s3-proxy/server/tls_test.go b/pkg/s3-proxy/server/tls_test.go index 4f5e7d42..7f73c4cf 100644 --- a/pkg/s3-proxy/server/tls_test.go +++ b/pkg/s3-proxy/server/tls_test.go @@ -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"}}, }, { @@ -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", @@ -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", @@ -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", @@ -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", @@ -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",