Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBS integration test for multipart uploads with GH owned storage #1299

Merged
merged 23 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6e1b3e3
Going to just do a full migrate command for the multipart repo
begonaguereca Nov 18, 2024
ccf741d
testing only my one integration test
begonaguereca Nov 18, 2024
b17afbc
testing only my one integration test
begonaguereca Nov 18, 2024
b09ce56
Add other tests back in
begonaguereca Nov 18, 2024
795f341
bug fix
begonaguereca Nov 18, 2024
d30d3af
Update src/OctoshiftCLI.IntegrationTests/TestHelper.cs
begonaguereca Nov 18, 2024
01ccf39
Add values back in
begonaguereca Nov 18, 2024
a93c4f9
Can we get only my test to run
begonaguereca Nov 18, 2024
ff6f6cc
Update src/OctoshiftCLI.IntegrationTests/TestHelper.cs
begonaguereca Nov 18, 2024
1ae70af
Add target repo name to command
begonaguereca Nov 18, 2024
aefa44b
Add target repo name to command
begonaguereca Nov 18, 2024
501e67d
Add target repo name to command
begonaguereca Nov 18, 2024
b1d855f
Add target repo name to command
begonaguereca Nov 18, 2024
7f099c1
Modifying migrate script
begonaguereca Nov 18, 2024
663cc7e
Modifying migrate script
begonaguereca Nov 18, 2024
ef18120
Modifying migrate script
begonaguereca Nov 18, 2024
739368c
Try it by making it a generate script
begonaguereca Nov 18, 2024
22f7656
Fix build error
begonaguereca Nov 18, 2024
626fc2a
Fix target repo name
begonaguereca Nov 18, 2024
42dbf06
Add tests back in
begonaguereca Nov 18, 2024
ca52a11
remove unncesary method
begonaguereca Nov 18, 2024
8e8dbba
Update src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs
begonaguereca Nov 19, 2024
db82dd8
Update src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs
begonaguereca Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading