Server: do not enable images tests by default because it needs a special
ffmpeg version
This commit is contained in:
parent
0f3a78e7ea
commit
2bd3f17127
|
@ -13,3 +13,4 @@ public/stylesheets/vendor
|
||||||
uploads
|
uploads
|
||||||
thumbnails
|
thumbnails
|
||||||
config/production.yaml
|
config/production.yaml
|
||||||
|
ffmpeg
|
||||||
|
|
|
@ -27,6 +27,7 @@ before_script:
|
||||||
- mkdir -p $HOME/bin
|
- mkdir -p $HOME/bin
|
||||||
- cp ffmpeg-*-64bit-static/{ffmpeg,ffprobe,ffserver} $HOME/bin
|
- cp ffmpeg-*-64bit-static/{ffmpeg,ffprobe,ffserver} $HOME/bin
|
||||||
- export PATH=$HOME/bin:$PATH
|
- export PATH=$HOME/bin:$PATH
|
||||||
|
- export NODE_TEST_IMAGE=true
|
||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- cat test1/logs/all-logs.log
|
- cat test1/logs/all-logs.log
|
||||||
|
|
|
@ -350,6 +350,9 @@ function searchVideoWithSort (url, search, sort, end) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testImage (url, videoName, imagePath, callback) {
|
function testImage (url, videoName, imagePath, callback) {
|
||||||
|
// Don't test images if the node env is not set
|
||||||
|
// Because we need a special ffmpeg version for this test
|
||||||
|
if (process.env.NODE_TEST_IMAGE) {
|
||||||
request(url)
|
request(url)
|
||||||
.get(imagePath)
|
.get(imagePath)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
@ -362,6 +365,10 @@ function testImage (url, videoName, imagePath, callback) {
|
||||||
callback(null, data.equals(res.body))
|
callback(null, data.equals(res.body))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
console.log('Do not test images. Enable it by setting NODE_TEST_IMAGE env variable.')
|
||||||
|
callback(null, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadVideo (url, accessToken, name, description, tags, fixture, specialStatus, end) {
|
function uploadVideo (url, accessToken, name, description, tags, fixture, specialStatus, end) {
|
||||||
|
|
Loading…
Reference in New Issue