@@ -44,6 +44,41 @@ try {
|
||||
$draftMode = in_array('--draft-preparation-only', $argv, true);
|
||||
$searchMode = in_array('--procurement-search-only', $argv, true);
|
||||
$productionMode = in_array('--warehouse-production-only', $argv, true);
|
||||
$configuredLevelsMode = in_array('--configured-approval-levels-only', $argv, true);
|
||||
$orderDocumentMode = in_array('--order-document-only', $argv, true);
|
||||
$payableInsightsMode = in_array('--payable-insights-only', $argv, true);
|
||||
$budgetDistributionMode = in_array('--budget-distribution-only', $argv, true);
|
||||
if ($budgetDistributionMode) {
|
||||
$environment['COMMON_BUDGET_PATH'] = 'C:/laragon/www/sgf-tempo/packages/budget-control';
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetDistributionContractTest.php', 'tests/Feature/BudgetTest.php', 'tests/Feature/BudgetReinforcementTest.php', 'tests/Feature/InvoiceTest.php']];
|
||||
if (in_array('--award-focused', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/PurchaseAwardOrderTest.php', '--filter=distributed approved synthetic|foreign award approves|foreign order cancellation|changed prices or matrix|repeated issuance|fractional quantities and VAT']];
|
||||
}
|
||||
if (in_array('--distribution-concurrency', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'tests/Concurrency/quotation-exchange-worker.php', $database, 'migrate'],
|
||||
[PHP_BINARY, 'tests/Concurrency/budget-distribution-worker.php', $database, 'race']];
|
||||
}
|
||||
if (in_array('--distribution-recovery', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'tests/Concurrency/quotation-exchange-worker.php', $database, 'migrate'],
|
||||
[PHP_BINARY, 'tests/Concurrency/budget-distribution-recovery-worker.php', $database]];
|
||||
}
|
||||
if (in_array('--distribution-visual-seed-check', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'tests/Concurrency/quotation-exchange-worker.php', $database, 'migrate'],
|
||||
[PHP_BINARY, 'tests/Concurrency/budget-distribution-visual-seed.php', $database]];
|
||||
}
|
||||
if (in_array('--distribution-schema', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/BudgetDistributionSchemaTest.php', 'tests/Feature/BudgetDistributionContractTest.php']];
|
||||
}
|
||||
}
|
||||
if ($payableInsightsMode) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/ProcurementPayableInsightsTest.php', ...(in_array('--focused', $argv, true) ? [] : ['tests/Feature/SupplierPayableIntegrationTest.php', 'tests/Feature/ProcurementReportsTest.php'])]];
|
||||
}
|
||||
if ($orderDocumentMode) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/PurchaseDocumentCompatibilityTest.php', 'tests/Feature/PurchaseAwardOrderTest.php', '--filter=older synthetic|print|issuance|discount evidence']];
|
||||
}
|
||||
if ($configuredLevelsMode) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/RequisitionApprovalLevelsTest.php', 'tests/Feature/InternalRequisitionCandidateTest.php', 'tests/Feature/OrganizationConfigurationTest.php', 'tests/Feature/WorkflowTaskInboxTest.php', 'tests/Feature/PurchaseProcessTest.php']];
|
||||
}
|
||||
if ($productionMode) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/WarehouseRequestsTest.php', 'tests/Feature/WarehouseFulfilmentTest.php', 'tests/Feature/AutomaticPurchasesTest.php']];
|
||||
}
|
||||
@@ -83,7 +118,7 @@ try {
|
||||
throw new RuntimeException('Validação PostgreSQL não aprovada.');
|
||||
}
|
||||
}
|
||||
if ($conversionMode || $agreementMode || $orderLimitMode || $upgradeMode || $benchmarkMode || $draftMode || $searchMode || $productionMode) {
|
||||
if ($conversionMode || $agreementMode || $orderLimitMode || $upgradeMode || $benchmarkMode || $draftMode || $searchMode || $productionMode || $configuredLevelsMode || $orderDocumentMode || $payableInsightsMode || $budgetDistributionMode) {
|
||||
return;
|
||||
}
|
||||
config(['database.connections.quotation_fx_proof' => [...$config, 'database' => $database, 'url' => null]]);
|
||||
|
||||
Reference in New Issue
Block a user