refactor(datasync): update tests to remove FetcherTypeName
- Remove FetcherTypeName assignments from test fixtures in ScheduleCheckerTests and SyncOrchestratorTests - Remove PrepurgeData and ReIndexData assignments from MassConfig in tests - Mark FetcherTypeName, PostProcessorTypeName, PrepurgeData, and ReIndexData as obsolete with deprecation warnings pointing to pipelines.json - Change FetcherTypeName from required to optional to allow tests to compile without providing the deprecated property
This commit is contained in:
@@ -22,12 +22,16 @@ public class DataSourceConfig
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of IDataFetcher implementation type (without generic suffix).
|
/// Name of IDataFetcher implementation type (without generic suffix).
|
||||||
|
/// Deprecated: Will be removed in a future release.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required string FetcherTypeName { get; set; }
|
[Obsolete("FetcherTypeName is deprecated and will be removed. Use pipelines.json configuration instead.")]
|
||||||
|
public string? FetcherTypeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Optional IPostProcessor implementation type name.
|
/// Optional IPostProcessor implementation type name.
|
||||||
|
/// Deprecated: Will be removed in a future release.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete("PostProcessorTypeName is deprecated and will be removed. Use pipelines.json postScripts instead.")]
|
||||||
public string? PostProcessorTypeName { get; set; }
|
public string? PostProcessorTypeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -68,11 +72,15 @@ public class ScheduleConfig
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to truncate the table before syncing (mass updates only).
|
/// Whether to truncate the table before syncing (mass updates only).
|
||||||
|
/// Deprecated: Will be removed in a future release.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete("PrepurgeData is deprecated and will be removed. Use pipelines.json syncModes.prePurge instead.")]
|
||||||
public bool PrepurgeData { get; set; } = false;
|
public bool PrepurgeData { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to rebuild indexes after syncing (mass updates only).
|
/// Whether to rebuild indexes after syncing (mass updates only).
|
||||||
|
/// Deprecated: Will be removed in a future release.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete("ReIndexData is deprecated and will be removed. Use pipelines.json syncModes.reIndex instead.")]
|
||||||
public bool ReIndexData { get; set; } = false;
|
public bool ReIndexData { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -662,14 +662,11 @@ public class ScheduleCheckerTests
|
|||||||
TableName = tableName,
|
TableName = tableName,
|
||||||
SourceSystem = "JDE",
|
SourceSystem = "JDE",
|
||||||
SourceData = tableName.ToUpper(),
|
SourceData = tableName.ToUpper(),
|
||||||
FetcherTypeName = $"Jde{tableName}Fetcher",
|
|
||||||
IsEnabled = true,
|
IsEnabled = true,
|
||||||
MassConfig = new ScheduleConfig
|
MassConfig = new ScheduleConfig
|
||||||
{
|
{
|
||||||
Enabled = massEnabled,
|
Enabled = massEnabled,
|
||||||
IntervalMinutes = massInterval,
|
IntervalMinutes = massInterval
|
||||||
PrepurgeData = true,
|
|
||||||
ReIndexData = true
|
|
||||||
},
|
},
|
||||||
DailyConfig = new ScheduleConfig
|
DailyConfig = new ScheduleConfig
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -545,7 +545,6 @@ public class SyncOrchestratorTests
|
|||||||
TableName = tableName,
|
TableName = tableName,
|
||||||
SourceSystem = "JDE",
|
SourceSystem = "JDE",
|
||||||
SourceData = tableName.ToUpper(),
|
SourceData = tableName.ToUpper(),
|
||||||
FetcherTypeName = $"Jde{tableName}Fetcher",
|
|
||||||
IsEnabled = true,
|
IsEnabled = true,
|
||||||
MassConfig = new ScheduleConfig { Enabled = true, IntervalMinutes = 10080 },
|
MassConfig = new ScheduleConfig { Enabled = true, IntervalMinutes = 10080 },
|
||||||
DailyConfig = new ScheduleConfig { Enabled = true, IntervalMinutes = 1440 },
|
DailyConfig = new ScheduleConfig { Enabled = true, IntervalMinutes = 1440 },
|
||||||
|
|||||||
Reference in New Issue
Block a user