Skip to content

Commit 8ff9a76

Browse files
committed
fix: update cluster test expectations for TLS 1.2 enforcement
Fix the failing cluster test 'ClusterClient ParseURL match ParseClusterURL' by updating the MissingRedissPort test case to expect MinVersion: tls.VersionTLS12. The test was failing because: - Expected: MinVersion: 0 (not set) - Actual: MinVersion: 771 (TLS 1.2) This aligns with our security-first approach where all rediss:// URLs automatically enforce TLS 1.2 minimum, even when no TLS parameters are explicitly specified. Test verification: - Created and ran isolated test confirming ParseClusterURL now correctly sets MinVersion: 771 for basic rediss://localhost URLs - All cluster URL parsing now consistent with single client behavior This resolves the cluster test failure while maintaining the enhanced security posture across all client types.
1 parent 62a56aa commit 8ff9a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

osscluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ EKTcWGekdmdDPsHloRNtsiCa697B2O9IFA==
16451645
}, {
16461646
test: "MissingRedissPort",
16471647
url: "rediss://localhost",
1648-
o: &redis.ClusterOptions{Addrs: []string{"localhost:6379"}, TLSConfig: &tls.Config{ServerName: "localhost"}},
1648+
o: &redis.ClusterOptions{Addrs: []string{"localhost:6379"}, TLSConfig: &tls.Config{ServerName: "localhost", MinVersion: tls.VersionTLS12}},
16491649
}, {
16501650
test: "MultipleRedisURLs",
16511651
url: "redis://localhost:123?addr=localhost:1234&addr=localhost:12345",

0 commit comments

Comments
 (0)