File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
packages/idempotency/tests/unit/persistence Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ describe('Class: RedisConnection', () => {
76
76
username : 'user' ,
77
77
password : 'pass' ,
78
78
dbIndex : 2 ,
79
- ssl : true ,
80
79
} ) ;
81
80
82
81
// Act
@@ -96,6 +95,33 @@ describe('Class: RedisConnection', () => {
96
95
expect ( createCluster ) . not . toHaveBeenCalled ( ) ;
97
96
} ) ;
98
97
98
+ it ( 'creates a standalone client without `tls` when `ssl` is false' , ( ) => {
99
+ // Prepare
100
+ const connection = new RedisConnection ( {
101
+ host : 'localhost' ,
102
+ port : 6380 ,
103
+ username : 'user' ,
104
+ password : 'pass' ,
105
+ dbIndex : 2 ,
106
+ ssl : false ,
107
+ } ) ;
108
+
109
+ // Act
110
+ connection . getClient ( ) ;
111
+
112
+ // Assess
113
+ expect ( createClient ) . toHaveBeenCalledWith ( {
114
+ username : 'user' ,
115
+ password : 'pass' ,
116
+ socket : {
117
+ host : 'localhost' ,
118
+ port : 6380 ,
119
+ } ,
120
+ database : 2 ,
121
+ } ) ;
122
+ expect ( createCluster ) . not . toHaveBeenCalled ( ) ;
123
+ } ) ;
124
+
99
125
it ( 'creates a cluster client when mode is set to cluster' , ( ) => {
100
126
// Prepare
101
127
const connection = new RedisConnection ( {
You can’t perform that action at this time.
0 commit comments