@@ -9,7 +9,7 @@ const { S3 } = require('@aws-sdk/client-s3');
9
9
const { NodeHttpHandler } = require ( "@smithy/node-http-handler" ) ;
10
10
const http = require ( 'http' ) ;
11
11
const system_store = require ( '../../server/system_services/system_store' ) . get_instance ( ) ;
12
- const upgrade_bucket_policy = require ( '../../upgrade/upgrade_scripts/5.14.0 /upgrade_bucket_policy' ) ;
12
+ const upgrade_bucket_policy = require ( '../../upgrade/upgrade_scripts/5.15.6 /upgrade_bucket_policy' ) ;
13
13
const dbg = require ( '../../util/debug_module' ) ( __filename ) ;
14
14
const assert = require ( 'assert' ) ;
15
15
const mocha = require ( 'mocha' ) ;
@@ -21,7 +21,7 @@ let s3;
21
21
async function _clean_all_bucket_policies ( ) {
22
22
for ( const bucket of system_store . data . buckets ) {
23
23
if ( bucket . s3_policy ) {
24
- await s3 . deleteBucketPolicy ( { Bucket : bucket . name . unwrap ( ) } ) ;
24
+ await s3 . deleteBucketPolicy ( { Bucket : bucket . name . unwrap ( ) } ) ;
25
25
}
26
26
}
27
27
}
@@ -50,8 +50,7 @@ mocha.describe('test upgrade scripts', async function() {
50
50
mocha . it ( 'test upgrade bucket policy to version 5.14.0' , async function ( ) {
51
51
const old_policy = {
52
52
version : '2012-10-17' ,
53
- statement : [
54
- {
53
+ statement : [ {
55
54
sid : 'id-1' ,
56
55
effect : 'allow' ,
57
56
principal : [ "*" ] ,
@@ -79,7 +78,7 @@ mocha.describe('test upgrade scripts', async function() {
79
78
}
80
79
} ) ;
81
80
82
- await upgrade_bucket_policy . run ( { dbg, system_store, system_server : null } ) ;
81
+ await upgrade_bucket_policy . run ( { dbg, system_store, system_server : null } ) ;
83
82
const res = await s3 . getBucketPolicy ( { // should work - bucket policy should fit current schema
84
83
Bucket : BKT ,
85
84
} ) ;
0 commit comments