-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1191 from github/feature/abort-migration
Feature/abort migration
- Loading branch information
Showing
9 changed files
with
146 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Release Notes: | ||
- Added `abort-migration` command to `gh ado2gh`, `gh bbs2gh` and `gh gei` that will abort a migration that is queued or in-progress. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/OctoshiftCLI.Tests/ado2gh/Commands/AbortMigration/AbortMigrationCommandTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using FluentAssertions; | ||
using OctoshiftCLI.AdoToGithub.Commands.AbortMigration; | ||
using Xunit; | ||
|
||
namespace OctoshiftCLI.Tests.AdoToGithub.Commands.AbortMigration; | ||
|
||
public class AbortMigrationCommandTests | ||
{ | ||
[Fact] | ||
public void Should_Have_Options() | ||
{ | ||
var command = new AbortMigrationCommand(); | ||
command.Should().NotBeNull(); | ||
command.Name.Should().Be("abort-migration"); | ||
command.Options.Count.Should().Be(3); | ||
|
||
TestHelpers.VerifyCommandOption(command.Options, "migration-id", true); | ||
TestHelpers.VerifyCommandOption(command.Options, "github-pat", false); | ||
TestHelpers.VerifyCommandOption(command.Options, "verbose", false); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OctoshiftCLI.Tests/bbs2gh/Commands/AbortMigration/AbortMigrationCommandTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using FluentAssertions; | ||
using OctoshiftCLI.BbsToGithub.Commands.AbortMigration; | ||
using Xunit; | ||
|
||
namespace OctoshiftCLI.Tests.BbsToGithub.Commands.AbortMigration; | ||
|
||
public class AbortMigrationCommandTests | ||
{ | ||
[Fact] | ||
public void Should_Have_Options() | ||
{ | ||
var command = new AbortMigrationCommand(); | ||
command.Should().NotBeNull(); | ||
command.Name.Should().Be("abort-migration"); | ||
command.Options.Count.Should().Be(3); | ||
|
||
TestHelpers.VerifyCommandOption(command.Options, "migration-id", true); | ||
TestHelpers.VerifyCommandOption(command.Options, "github-pat", false); | ||
TestHelpers.VerifyCommandOption(command.Options, "verbose", false); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OctoshiftCLI.Tests/gei/Commands/AbortMigration/AbortMigrationCommandTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using FluentAssertions; | ||
using OctoshiftCLI.GithubEnterpriseImporter.Commands.AbortMigration; | ||
using Xunit; | ||
|
||
namespace OctoshiftCLI.Tests.GithubEnterpriseImporter.Commands.AbortMigration; | ||
|
||
public class AbortMigrationCommandTests | ||
{ | ||
[Fact] | ||
public void Should_Have_Options() | ||
{ | ||
var command = new AbortMigrationCommand(); | ||
command.Should().NotBeNull(); | ||
command.Name.Should().Be("abort-migration"); | ||
command.Options.Count.Should().Be(3); | ||
|
||
TestHelpers.VerifyCommandOption(command.Options, "migration-id", true); | ||
TestHelpers.VerifyCommandOption(command.Options, "github-pat", false); | ||
TestHelpers.VerifyCommandOption(command.Options, "verbose", false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using OctoshiftCLI.Commands.AbortMigration; | ||
|
||
namespace OctoshiftCLI.AdoToGithub.Commands.AbortMigration; | ||
|
||
public sealed class AbortMigrationCommand : AbortMigrationCommandBase | ||
{ | ||
public AbortMigrationCommand() : base() => AddOptions(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using OctoshiftCLI.Commands.AbortMigration; | ||
|
||
namespace OctoshiftCLI.BbsToGithub.Commands.AbortMigration; | ||
|
||
public sealed class AbortMigrationCommand : AbortMigrationCommandBase | ||
{ | ||
public AbortMigrationCommand() : base() => AddOptions(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using OctoshiftCLI.Commands.AbortMigration; | ||
|
||
namespace OctoshiftCLI.GithubEnterpriseImporter.Commands.AbortMigration; | ||
|
||
public sealed class AbortMigrationCommand : AbortMigrationCommandBase | ||
{ | ||
public AbortMigrationCommand() : base() => AddOptions(); | ||
} |