@@ -199,13 +199,14 @@ describe('redis plugin', function() {
199
199
200
200
return previous ;
201
201
} , [ ] ) ;
202
- assert . equal ( messages . length , 8 ) ;
202
+ assert . equal ( messages . length , 9 ) ;
203
203
} ) ;
204
204
it ( 'adds default config to the config object' , function ( ) {
205
205
plugin . configure ( context ) ;
206
206
assert . isDefined ( config . redis . host ) ;
207
207
assert . isDefined ( config . redis . port ) ;
208
208
assert . isDefined ( config . redis . keyPrefix ) ;
209
+ assert . isDefined ( config . redis . activationSuffix ) ;
209
210
assert . isDefined ( config . redis . didDeployMessage ) ;
210
211
} ) ;
211
212
} ) ;
@@ -228,7 +229,7 @@ describe('redis plugin', function() {
228
229
} ;
229
230
plugin . beforeHook ( context ) ;
230
231
} ) ;
231
- it ( 'warns about missing optional filePattern, distDir, revisionKey, didDeployMessage, and connection info' , function ( ) {
232
+ it ( 'warns about missing optional filePattern, distDir, activationSuffix, revisionKey, didDeployMessage, and connection info' , function ( ) {
232
233
plugin . configure ( context ) ;
233
234
var messages = mockUi . messages . reduce ( function ( previous , current ) {
234
235
if ( / - M i s s i n g c o n f i g : \s .* , u s i n g d e f a u l t : \s / . test ( current ) ) {
@@ -237,18 +238,59 @@ describe('redis plugin', function() {
237
238
238
239
return previous ;
239
240
} , [ ] ) ;
240
- assert . equal ( messages . length , 7 ) ;
241
+ assert . equal ( messages . length , 8 ) ;
241
242
} ) ;
242
243
it ( 'does not add default config to the config object' , function ( ) {
243
244
plugin . configure ( context ) ;
244
245
assert . isDefined ( config . redis . host ) ;
245
246
assert . isDefined ( config . redis . port ) ;
246
247
assert . isDefined ( config . redis . filePattern ) ;
248
+ assert . isDefined ( config . redis . activationSuffix ) ;
247
249
assert . isDefined ( config . redis . didDeployMessage ) ;
248
250
assert . equal ( config . redis . keyPrefix , 'proj:home' ) ;
249
251
} ) ;
250
252
} ) ;
251
253
254
+ describe ( 'with an activationSuffix provided' , function ( ) {
255
+ var config , plugin , context ;
256
+ beforeEach ( function ( ) {
257
+ config = {
258
+ redis : {
259
+ activationSuffix : 'special:suffix'
260
+ }
261
+ } ;
262
+ plugin = subject . createDeployPlugin ( {
263
+ name : 'redis'
264
+ } ) ;
265
+ context = {
266
+ ui : mockUi ,
267
+ project : stubProject ,
268
+ config : config
269
+ } ;
270
+ plugin . beforeHook ( context ) ;
271
+ } ) ;
272
+ it ( 'warns about missing optional filePattern, distDir, keyPrefix, revisionKey, didDeployMessage, and connection info' , function ( ) {
273
+ plugin . configure ( context ) ;
274
+ var messages = mockUi . messages . reduce ( function ( previous , current ) {
275
+ if ( / - M i s s i n g c o n f i g : \s .* , u s i n g d e f a u l t : \s / . test ( current ) ) {
276
+ previous . push ( current ) ;
277
+ }
278
+
279
+ return previous ;
280
+ } , [ ] ) ;
281
+ assert . equal ( messages . length , 8 )
282
+ } ) ;
283
+ it ( 'does not add default config to the config object' , function ( ) {
284
+ plugin . configure ( context ) ;
285
+ assert . isDefined ( config . redis . host ) ;
286
+ assert . isDefined ( config . redis . port ) ;
287
+ assert . isDefined ( config . redis . filePattern ) ;
288
+ assert . isDefined ( config . redis . keyPrefix ) ;
289
+ assert . isDefined ( config . redis . didDeployMessage ) ;
290
+ assert . equal ( config . redis . activationSuffix , 'special:suffix' ) ;
291
+ } ) ;
292
+ } ) ;
293
+
252
294
describe ( 'with a url provided' , function ( ) {
253
295
var config , plugin , context ;
254
296
beforeEach ( function ( ) {
@@ -267,7 +309,7 @@ describe('redis plugin', function() {
267
309
} ;
268
310
plugin . beforeHook ( context ) ;
269
311
} ) ;
270
- it ( 'warns about missing optional filePattern, distDir, keyPrefix, revisionKey and didDeployMessage only' , function ( ) {
312
+ it ( 'warns about missing optional filePattern, distDir, keyPrefix, activationSuffix, revisionKey, and didDeployMessage only' , function ( ) {
271
313
plugin . configure ( context ) ;
272
314
var messages = mockUi . messages . reduce ( function ( previous , current ) {
273
315
if ( / - M i s s i n g c o n f i g : \s .* , u s i n g d e f a u l t : \s / . test ( current ) ) {
@@ -276,7 +318,7 @@ describe('redis plugin', function() {
276
318
277
319
return previous ;
278
320
} , [ ] ) ;
279
- assert . equal ( messages . length , 6 ) ;
321
+ assert . equal ( messages . length , 7 ) ;
280
322
} ) ;
281
323
282
324
it ( 'does not add default config to the config object' , function ( ) {
0 commit comments