Skip to content

Commit

Permalink
πŸ”§ (configuration.json): update EndpointType to AzureDevOpsEndpoint
Browse files Browse the repository at this point in the history
πŸ“ (MigrationTools.xml): update generated documentation with new commit details
βœ… (TfsWorkItemMigrationProcessorTests.cs): add SourceName and TargetName to test validation
♻️ (Processor.cs): remove redundant Telemetry.TrackException call

Updating the EndpointType in configuration.json to AzureDevOpsEndpoint reflects the current naming conventions and services used. The generated documentation in MigrationTools.xml is updated to reflect the latest commit details, ensuring accuracy. Adding SourceName and TargetName in the TfsWorkItemMigrationProcessorTests.cs improves the test coverage and validation accuracy. Removing the redundant Telemetry.TrackException call in Processor.cs simplifies the error handling and logging process.
  • Loading branch information
MrHinsh committed Sep 15, 2024
1 parent a9e012b commit 5bcbf70
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Version": "16.0",
"Endpoints": {
"Source": {
"EndpointType": "TfsTeamProjectEndpoint",
"EndpointType": "AzureDevOpsEndpoint",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationSource1",
"AllowCrossProjectLinking": false,
Expand All @@ -26,7 +26,7 @@
}
},
"Target": {
"EndpointType": "TfsTeamProjectEndpoint",
"EndpointType": "AzureDevOpsEndpoint",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "migrationTest5",
"TfsVersion": "AzureDevOps",
Expand Down
12 changes: 6 additions & 6 deletions docs/Reference/Generated/MigrationTools.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MigrationTools.Processors.Tests
Expand All @@ -25,7 +26,10 @@ public void OptionsValidator_Valid()
var validator = new TfsWorkItemMigrationProcessorOptionsValidator();
var x = new TfsWorkItemMigrationProcessorOptions();
x.WIQLQuery = "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject";
Assert.IsTrue(validator.Validate(null, x).Succeeded);
x.SourceName = "source";
x.TargetName = "target";
ValidateOptionsResult result = validator.Validate(null, x);
Assert.IsTrue(result.Succeeded);
}

}
Expand Down
1 change: 0 additions & 1 deletion src/MigrationTools/Processors/Infrastructure/Processor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public void Execute()
{
Status = ProcessingStatus.Failed;
ProcessorActivity.SetStatus(ActivityStatusCode.Error);
Telemetry.TrackException(ex, ProcessorActivity.Tags);
Log.LogCritical(ex, "Validation of your configuration failed:");
}
catch (ConfigurationValidationException ex)
Expand Down

0 comments on commit 5bcbf70

Please sign in to comment.