优化
This commit is contained in:
@@ -173,6 +173,15 @@ baiyue:
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_RECEIVABLE_STATISTICS:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_RECEIVABLE_STATISTICS/batches
|
||||
required-permission: platform:finance:receivable-statistics:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
management.endpoints.web.exposure.include: health,info,prometheus
|
||||
|
||||
logging:
|
||||
|
||||
@@ -19,6 +19,13 @@ class ExportDefinitionRegistryTest {
|
||||
registry.setDefinitions(Map.of("FINANCE_RECONCILIATION_STATEMENT_LIST", finance));
|
||||
assertDoesNotThrow(registry::validate);
|
||||
}
|
||||
@Test void acceptsTheReceivableStatisticsProvider() {
|
||||
ExportDefinitionRegistry registry=new ExportDefinitionRegistry();
|
||||
var finance=definition("finance-service","/internal/exports/v1/FINANCE_RECEIVABLE_STATISTICS/batches");
|
||||
finance.setRequiredPermission("platform:finance:receivable-statistics:export");
|
||||
registry.setDefinitions(Map.of("FINANCE_RECEIVABLE_STATISTICS", finance));
|
||||
assertDoesNotThrow(registry::validate);
|
||||
}
|
||||
@Test void rejectsSsrfAndPathTypeMismatch() {
|
||||
ExportDefinitionRegistry registry=new ExportDefinitionRegistry();
|
||||
assertThrows(IllegalStateException.class, () -> registry.setDefinitions(Map.of("CUSTOMER_LIST", definition("evil-service","/internal/exports/v1/OTHER/batches"))));
|
||||
|
||||
Reference in New Issue
Block a user