File tree 4 files changed +8
-5
lines changed
OctoshiftCLI.Tests/gei/Commands/MigrateRepo
4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
-
1
+ - ` gh gei migrate-repo ` logs the git and metadata archive download paths when ` --keep-archive ` is used.
Original file line number Diff line number Diff line change @@ -1680,7 +1680,7 @@ await _handler.Invoking(async x => await x.Handle(new MigrateRepoCommandArgs
1680
1680
}
1681
1681
1682
1682
[ Fact ]
1683
- public async Task Keep_Archive_Does_Not_Call_DeleteIfExists ( )
1683
+ public async Task Keep_Archive_Does_Not_Call_DeleteIfExists_And_Logs_Downloaded_Archive_Paths ( )
1684
1684
{
1685
1685
_mockTargetGithubApi . Setup ( x => x . GetOrganizationId ( TARGET_ORG ) . Result ) . Returns ( GITHUB_ORG_ID ) ;
1686
1686
_mockTargetGithubApi . Setup ( x => x . CreateGhecMigrationSource ( GITHUB_ORG_ID ) . Result ) . Returns ( MIGRATION_SOURCE_ID ) ;
@@ -1737,6 +1737,9 @@ public async Task Keep_Archive_Does_Not_Call_DeleteIfExists()
1737
1737
1738
1738
_mockFileSystemProvider . Verify ( x => x . DeleteIfExists ( GIT_ARCHIVE_FILE_PATH ) , Times . Never ) ;
1739
1739
_mockFileSystemProvider . Verify ( x => x . DeleteIfExists ( METADATA_ARCHIVE_FILE_PATH ) , Times . Never ) ;
1740
+
1741
+ _mockOctoLogger . Verify ( x => x . LogInformation ( $ "Git archive was successfully downloaded at \" { GIT_ARCHIVE_FILE_PATH } \" ") ) ;
1742
+ _mockOctoLogger . Verify ( x => x . LogInformation ( $ "Metadata archive was successfully downloaded at \" { METADATA_ARCHIVE_FILE_PATH } \" ") ) ;
1740
1743
}
1741
1744
1742
1745
[ Fact ]
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public MigrateRepoCommand() : base(
150
150
151
151
public Option < bool > KeepArchive { get ; } = new ( "--keep-archive" )
152
152
{
153
- Description = "Keeps the archive on this machine after uploading to the blob storage account. Only applicable for migrations from GitHub Enterprise Server versions before 3.8.0."
153
+ Description = "Keeps the archive on this machine after uploading to the blob storage account. Only applicable for migrations from GitHub Enterprise Server versions before 3.8.0 or when used with --use-github-storage ."
154
154
} ;
155
155
156
156
public override MigrateRepoCommandHandler BuildHandler ( MigrateRepoCommandArgs args , IServiceProvider sp )
Original file line number Diff line number Diff line change @@ -262,11 +262,11 @@ private string ExtractGhesBaseUrl(string ghesApiUrl)
262
262
{
263
263
_log . LogInformation ( $ "Downloading archive from { gitArchiveUrl } ") ;
264
264
await _httpDownloadService . DownloadToFile ( gitArchiveUrl , gitArchiveDownloadFilePath ) ;
265
- _log . LogInformation ( "Download complete" ) ;
265
+ _log . LogInformation ( keepArchive ? $ "Git archive was successfully downloaded at \" { gitArchiveDownloadFilePath } \" " : "Download complete" ) ;
266
266
267
267
_log . LogInformation ( $ "Downloading archive from { metadataArchiveUrl } ") ;
268
268
await _httpDownloadService . DownloadToFile ( metadataArchiveUrl , metadataArchiveDownloadFilePath ) ;
269
- _log . LogInformation ( "Download complete" ) ;
269
+ _log . LogInformation ( keepArchive ? $ "Metadata archive was successfully downloaded at \" { metadataArchiveDownloadFilePath } \" " : "Download complete" ) ;
270
270
271
271
return (
272
272
await UploadArchive (
You can’t perform that action at this time.
0 commit comments