@@ -12,7 +12,7 @@ import (
1212
1313func TestGetSecurityProfileConfig_NilProfile (t * testing.T ) {
1414 // When profile is nil, should use Intermediate defaults
15- minVersion , cipherSuites := apiserver .GetSecurityProfileConfig (nil )
15+ minVersion , cipherSuites , _ := apiserver .GetSecurityProfileConfig (nil )
1616
1717 assert .Equal (t , uint16 (tls .VersionTLS12 ), minVersion , "Intermediate profile should use TLS 1.2" )
1818 assert .NotEmpty (t , cipherSuites , "Should have cipher suites" )
@@ -23,7 +23,7 @@ func TestGetSecurityProfileConfig_IntermediateProfile(t *testing.T) {
2323 Type : apiconfigv1 .TLSProfileIntermediateType ,
2424 }
2525
26- minVersion , cipherSuites := apiserver .GetSecurityProfileConfig (profile )
26+ minVersion , cipherSuites , _ := apiserver .GetSecurityProfileConfig (profile )
2727
2828 assert .Equal (t , uint16 (tls .VersionTLS12 ), minVersion , "Intermediate profile should use TLS 1.2" )
2929 assert .NotEmpty (t , cipherSuites , "Should have cipher suites" )
@@ -35,7 +35,7 @@ func TestGetSecurityProfileConfig_ModernProfile(t *testing.T) {
3535 Type : apiconfigv1 .TLSProfileModernType ,
3636 }
3737
38- minVersion , cipherSuites := apiserver .GetSecurityProfileConfig (profile )
38+ minVersion , cipherSuites , _ := apiserver .GetSecurityProfileConfig (profile )
3939
4040 assert .Equal (t , uint16 (tls .VersionTLS13 ), minVersion , "Modern profile should use TLS 1.3" )
4141 assert .NotEmpty (t , cipherSuites , "Should have cipher suites" )
@@ -46,7 +46,7 @@ func TestGetSecurityProfileConfig_OldProfile(t *testing.T) {
4646 Type : apiconfigv1 .TLSProfileOldType ,
4747 }
4848
49- minVersion , cipherSuites := apiserver .GetSecurityProfileConfig (profile )
49+ minVersion , cipherSuites , _ := apiserver .GetSecurityProfileConfig (profile )
5050
5151 assert .Equal (t , uint16 (tls .VersionTLS10 ), minVersion , "Old profile should use TLS 1.0" )
5252 assert .NotEmpty (t , cipherSuites , "Should have cipher suites" )
@@ -67,7 +67,7 @@ func TestGetSecurityProfileConfig_CustomProfile(t *testing.T) {
6767 },
6868 }
6969
70- minVersion , cipherSuites := apiserver .GetSecurityProfileConfig (profile )
70+ minVersion , cipherSuites , _ := apiserver .GetSecurityProfileConfig (profile )
7171
7272 assert .Equal (t , uint16 (tls .VersionTLS13 ), minVersion , "Custom profile should respect MinTLSVersion" )
7373 assert .NotEmpty (t , cipherSuites , "Should have cipher suites" )
@@ -80,7 +80,7 @@ func TestGetSecurityProfileConfig_CustomProfileWithoutSpec(t *testing.T) {
8080 Custom : nil ,
8181 }
8282
83- minVersion , cipherSuites := apiserver .GetSecurityProfileConfig (profile )
83+ minVersion , cipherSuites , _ := apiserver .GetSecurityProfileConfig (profile )
8484
8585 assert .Equal (t , uint16 (tls .VersionTLS12 ), minVersion , "Should fall back to Intermediate" )
8686 assert .NotEmpty (t , cipherSuites , "Should have cipher suites" )
@@ -118,6 +118,7 @@ func TestApplySecureDefaults(t *testing.T) {
118118 if tt .name == "EmptyConfig" {
119119 assert .NotZero (t , tt .config .MinVersion , "MinVersion should be set" )
120120 assert .NotEmpty (t , tt .config .CipherSuites , "CipherSuites should be set" )
121+ assert .NotEmpty (t , tt .config .CurvePreferences , "CurvePreferences should be set" )
121122 }
122123 assert .True (t , tt .config .PreferServerCipherSuites , "PreferServerCipherSuites should be true" )
123124 })
0 commit comments