diff --git a/test/tester.js b/test/tester.js index 3b7c681..2248f39 100644 --- a/test/tester.js +++ b/test/tester.js @@ -5,47 +5,47 @@ const path = require('path'); // console.log('Testing database functions...'); -try { - storageManager.createFolder('test_folder'); - console.log('1 - Folder created'); - storageManager.deleteFolder('test_folder'); - console.log('2 - Folder deleted'); -} catch (error) { - console.error('Error testing database functions:', error); -} - -function getSmileImage() { - return path.join(__dirname, '../sample/smile.png'); -} - -//test de lancement d'une création de vidéo sur le projet 1 -// videoManager.createVideo(1).then(res => { -// console.log('3 - Video created:', res); -// }).catch(err => { -// console.error('Error creating video:', err); -// }); -// async function run() { -// var Path = await measureManager.getPathFromIds(1, 1); -// console.log(Path); +// try { +// storageManager.createFolder('test_folder'); +// console.log('1 - Folder created'); +// storageManager.deleteFolder('test_folder'); +// console.log('2 - Folder deleted'); +// } catch (error) { +// console.error('Error testing database functions:', error); // } -// run().catch(err => { +// function getSmileImage() { +// return path.join(__dirname, '../sample/smile.png'); +// } + +// //test de lancement d'une création de vidéo sur le projet 1 +// // videoManager.createVideo(1).then(res => { +// // console.log('3 - Video created:', res); +// // }).catch(err => { +// // console.error('Error creating video:', err); +// // }); +// // async function run() { +// // var Path = await measureManager.getPathFromIds(1, 1); +// // console.log(Path); +// // } + +// // run().catch(err => { +// // console.error('Error:', err); +// // }); + +// var pathList = [ +// 'storage/1/images/1.jpg', +// 'storage/1/images/10.jpg', +// 'storage/1/images/20.jpg', +// 'storage/1/images/30.jpg', +// ]; +// videoManager.createVideoWithList(1, pathList).then(res => { +// console.log('3 - Video created:', res); +// return storageManager.deleteFile(res); +// }).then(res => { +// console.log('4 - Video deleted:', res); +// }).catch(err => { // console.error('Error:', err); // }); -var pathList = [ - 'storage/1/images/1.jpg', - 'storage/1/images/10.jpg', - 'storage/1/images/20.jpg', - 'storage/1/images/30.jpg', -]; -videoManager.createVideoWithList(1, pathList).then(res => { - console.log('3 - Video created:', res); - return storageManager.deleteFile(res); -}).then(res => { - console.log('4 - Video deleted:', res); -}).catch(err => { - console.error('Error:', err); -}); - exports.getSmileImage = getSmileImage; \ No newline at end of file