Skip to content

Commit

Permalink
Merge pull request #1299 from github/bbs-multipart
Browse files Browse the repository at this point in the history
BBS integration test for multipart uploads with GH owned storage
  • Loading branch information
begonaguereca authored Nov 19, 2024
2 parents 0917c73 + db82dd8 commit af327dc
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,33 @@ await _targetHelper.RunBbsCliMigration(
// TODO: Assert migration logs are downloaded
}

[Fact]
public async Task MigrateRepo_MultipartUpload()
{
var githubTargetOrg = $"octoshift-e2e-bbs-{TestHelper.GetOsName()}";
var bbsProjectKey = $"IN";
var bbsServer = "http://e2e-bbs-8-5-0-linux-2204.eastus.cloudapp.azure.com:7990";
var targetRepo = $"IN-100_cli";

var sshKey = Environment.GetEnvironmentVariable(GetSshKeyName(bbsServer));
await File.WriteAllTextAsync(Path.Join(TestHelper.GetOsDistPath(), SSH_KEY_FILE), sshKey);


var retryPolicy = new RetryPolicy(null);
await retryPolicy.Retry(async () =>
{
await _targetHelper.ResetGithubTestEnvironment(githubTargetOrg);
});

await _targetHelper.RunBbsCliMigration(
$"generate-script --github-org {githubTargetOrg} --bbs-server-url {bbsServer} --bbs-project {bbsProjectKey} --ssh-user octoshift --ssh-private-key {SSH_KEY_FILE} --use-github-storage", _tokens);

_targetHelper.AssertNoErrorInLogs(_startTime);

await _targetHelper.AssertGithubRepoExists(githubTargetOrg, targetRepo);
await _targetHelper.AssertGithubRepoInitialized(githubTargetOrg, targetRepo);
}

private string GetSshKeyName(string bbsServer)
{
var bbsVersion = Regex.Match(bbsServer, @"e2e-bbs-(\d{1,2}-\d{1,2}-\d{1,2})").Groups[1].Value.Replace('-', '_');
Expand Down

0 comments on commit af327dc

Please sign in to comment.