openvidu-test-e2e: add cache management to commonFunctions.groovy

pull/672/head
pabloFuente 2021-11-18 17:36:02 +01:00
parent b8e4e48f2e
commit 48ebf2d36b
1 changed files with 12 additions and 0 deletions

View File

@ -145,4 +145,16 @@ def removeStrandedContainers(removeTestingContainers) {
}
}
def storeInCache(folderToStore, cacheDestiny) {
println('Storing in cache')
sh "sudo mkdir -p ${folderToStore}"
sh "sudo mv ${folderToStore} ${cacheDestiny}"
}
def loadFromCache(cacheFolder, destinyFolder) {
println('Loading from cache')
sh "sudo mv ${cacheFolder} ${destinyFolder}"
sh "sudo chown -R 1000:1000 ${destinyFolder} && sudo chmod 777 ${destinyFolder}"
}
return this