улучшение описания пакетов

This commit is contained in:
2024-10-03 16:21:11 +03:00
parent 76b6a36de6
commit 4ad0a32238
12 changed files with 88 additions and 44 deletions

View File

@@ -172,12 +172,12 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
case PerformAutoSapforTesting:
Print("Запустить автоматическое тестирование SAPFOR");
TextLog Log = new TextLog();
tryAutoSapforTesting(Log);
SapforPackage autoPackage = tryAutoSapforTesting(Log);
response = new ServerExchangeUnit_2021(ServerCode.OK);
EmailMessage message = Log.isEmpty() ?
new EmailMessage(
"Запущено автоматической тестирование версии " + request.arg + " системы SAPFOR",
"", new Vector<>()) :
"Запущено автоматическое тестирование версии " + request.arg + " системы SAPFOR",
"Пакет "+ Utils.Brackets(autoPackage.id), new Vector<>()) :
new EmailMessage(
"Не удалось запустить автоматическое тестирование версии " + request.arg + " системы SAPFOR",
Log.toString(),
@@ -606,7 +606,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
response = new ServerExchangeUnit_2021(ServerCode.OK);
response.object = serverSapfor;
}
void tryAutoSapforTesting(TextLog Log) throws Exception {
SapforPackage tryAutoSapforTesting(TextLog Log) throws Exception {
//--
Account account = new Account();
account.name = "server";
@@ -617,17 +617,17 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
if (!db.serverSapfors.containsKey(sapforId)) {
Log.Writeln_("Версия SAPFOR " + sapforId + " не существует.");
return;
return null;
}
ServerSapfor sapfor = db.serverSapfors.get(sapforId);
if (!sapfor.state.equals(ServerSapforState.Done)) {
Log.Writeln_("Выбранная версия SAPFOR " + sapforId + " не собрана!");
return;
return null;
}
Vector<SapforConfiguration> configurations = db.sapforConfigurations.getAutoConfigurations();
if (configurations.isEmpty()) {
Log.Writeln_("Не найдено конфигураций для автоматического тестирования!");
return;
return null;
}
SapforPackage target = new SapforPackage(account,
sapfor,
@@ -637,12 +637,13 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
//-
if (target.tasksCount == 0) {
Log.Writeln_("Не сформировано ни одной новой задачи.");
return;
return null;
}
beforePublishAction(target);
db.InsertS(target);
afterPublishAction(target);
//--
return target;
}
}