File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,28 @@ describe('reportHandler.getCapabilities', () => {
248248 assert . strictEqual ( caps . locationTypeLocal , true ) ;
249249 } ) ;
250250
251+ it ( 'should update locationTypes capabilities when locationTypes is a Set' , ( ) => {
252+ const cfg = {
253+ capabilities : {
254+ locationTypeAzure : true ,
255+ locationTypeGCP : true ,
256+ locationTypeDigitalOcean : true ,
257+ locationTypeLocal : true ,
258+ locationTypes : new Set ( [
259+ 'location-gcp-v1' ,
260+ 'location-file-v1' ,
261+ ] ) ,
262+ } ,
263+ supportedLifecycleRules : [ 'Expiration' ] ,
264+ } ;
265+ const caps = getCapabilities ( cfg ) ;
266+
267+ assert . strictEqual ( caps . locationTypeAzure , false ) ;
268+ assert . strictEqual ( caps . locationTypeGCP , true ) ;
269+ assert . strictEqual ( caps . locationTypeDigitalOcean , false ) ;
270+ assert . strictEqual ( caps . locationTypeLocal , true ) ;
271+ } ) ;
272+
251273 it ( 'should handle multiple consistency checks together' , ( ) => {
252274 process . env . LOCAL_VOLUME_CAPABILITY = '0' ;
253275 const cfg = {
You can’t perform that action at this time.
0 commit comments