File tree Expand file tree Collapse file tree
OctoshiftCLI.Tests/gei/Commands/MigrateRepo Expand file tree Collapse file tree 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
16801680 }
16811681
16821682 [ 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 ( )
16841684 {
16851685 _mockTargetGithubApi . Setup ( x => x . GetOrganizationId ( TARGET_ORG ) . Result ) . Returns ( GITHUB_ORG_ID ) ;
16861686 _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()
17371737
17381738 _mockFileSystemProvider . Verify ( x => x . DeleteIfExists ( GIT_ARCHIVE_FILE_PATH ) , Times . Never ) ;
17391739 _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 } \" ") ) ;
17401743 }
17411744
17421745 [ Fact ]
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public MigrateRepoCommand() : base(
150150
151151 public Option < bool > KeepArchive { get ; } = new ( "--keep-archive" )
152152 {
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 ."
154154 } ;
155155
156156 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)
262262 {
263263 _log . LogInformation ( $ "Downloading archive from { gitArchiveUrl } ") ;
264264 await _httpDownloadService . DownloadToFile ( gitArchiveUrl , gitArchiveDownloadFilePath ) ;
265- _log . LogInformation ( "Download complete" ) ;
265+ _log . LogInformation ( keepArchive ? $ "Git archive was successfully downloaded at \" { gitArchiveDownloadFilePath } \" " : "Download complete" ) ;
266266
267267 _log . LogInformation ( $ "Downloading archive from { metadataArchiveUrl } ") ;
268268 await _httpDownloadService . DownloadToFile ( metadataArchiveUrl , metadataArchiveDownloadFilePath ) ;
269- _log . LogInformation ( "Download complete" ) ;
269+ _log . LogInformation ( keepArchive ? $ "Metadata archive was successfully downloaded at \" { metadataArchiveDownloadFilePath } \" " : "Download complete" ) ;
270270
271271 return (
272272 await UploadArchive (
You can’t perform that action at this time.
0 commit comments