скачать результатов текущего двм пакета.
This commit is contained in:
@@ -552,6 +552,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
Print("Получить данные по пакетам Sapfor");
|
||||
UpdateActiveSapforPackages();
|
||||
break;
|
||||
case DownloadDVMPackage:
|
||||
Print("Загрузить пакет DVM");
|
||||
DownloadDVMPackage();
|
||||
break;
|
||||
default:
|
||||
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
||||
}
|
||||
@@ -832,4 +836,15 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
}
|
||||
response.object = res_;
|
||||
}
|
||||
private void DownloadDVMPackage() throws Exception{
|
||||
int dvmPackage_id = (int) request.object;
|
||||
if (!db.dvmPackages.containsKey(dvmPackage_id))
|
||||
throw new RepositoryRefuseException("Не найдено пакета тестирования DVM с ключом "+dvmPackage_id);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
DVMPackage dvmPackage = db.dvmPackages.get(dvmPackage_id);
|
||||
File workspace = dvmPackage.getLocalWorkspace();
|
||||
File results_zip = new File (workspace, "results.zip");
|
||||
File package_json = dvmPackage.getJsonFile();
|
||||
response.object = new Pair(Utils.packFile(results_zip), Utils.packFile(package_json));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user