File tree Expand file tree Collapse file tree
handwritten/storage/system-test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- // eslint-disable-next-line no-undef
15+ /* eslint-disable node/no-missing-require, no-unused-vars, no- undef */
1616const { Storage} = require ( '@google-cloud/storage' ) ;
1717
1818function main ( ) {
19- // eslint-disable-next-line no-unused-vars
2019 const storage = new Storage ( ) ;
2120}
2221
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- // eslint-disable-next-line no-undef
16- const { Storage} = require ( '@google-cloud/storage' ) ;
15+ /* eslint-disable node/no-missing-import, no-unused-vars */
16+ import { Storage } from '@google-cloud/storage' ;
1717
1818function main ( ) {
19- // eslint-disable-next-line no-unused-vars
2019 const storage = new Storage ( ) ;
2120}
2221
Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ describe('resumable-upload', () => {
5555 retryableErrorFn : RETRYABLE_ERR_FN_DEFAULT ,
5656 } ;
5757
58- const bucket = new Storage ( { retryOptions} ) . bucket ( bucketName ) ;
58+ const bucket = new Storage ( {
59+ projectId : process . env . PROJECT_ID ,
60+ retryOptions : retryOptions ,
61+ } ) . bucket ( bucketName ) ;
5962 let filePath : string ;
6063
6164 before ( async ( ) => {
@@ -97,7 +100,7 @@ describe('resumable-upload', () => {
97100 // see: https://cloud.google.com/storage/docs/exponential-backoff:
98101 const ms = Math . pow ( 2 , retries ) * 1000 + Math . random ( ) * 2000 ;
99102 console . info ( `retrying "${ title } " in ${ ms } ms` ) ;
100- setTimeout ( done ( ) , ms ) ;
103+ setTimeout ( ( ) => done ( ) , ms ) ;
101104 }
102105
103106 it ( 'should work' , done => {
You can’t perform that action at this time.
0 commit comments