function getAllFileNamesTobeDeleted()

in lib/Utils/CreateAndRunUtils.js [140:167]


function getAllFileNamesTobeDeleted(loadTestConfig, testFiles) {
    let filesToDelete = [];
    if (testFiles.userPropFileInfo != null) {
        filesToDelete.push(testFiles.userPropFileInfo.fileName);
    }
    if (!(0, util_1.isNullOrUndefined)(testFiles.additionalFileInfo)) {
        // delete existing files which are not present in yaml, the files which are in yaml will anyway be uploaded again.
        let file;
        for (file of testFiles.additionalFileInfo) {
            filesToDelete.push(file.fileName);
        }
        for (let file of loadTestConfig.configurationFiles) {
            file = Util.getFileName(file);
            let indexOfFile = filesToDelete.indexOf(file);
            if (indexOfFile != -1) {
                filesToDelete.splice(indexOfFile, 1);
            }
        }
        for (let file of loadTestConfig.zipArtifacts) {
            file = Util.getFileName(file);
            let indexOfFile = filesToDelete.indexOf(file);
            if (indexOfFile != -1) {
                filesToDelete.splice(indexOfFile, 1);
            }
        }
    }
    return filesToDelete;
}