Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
10 changes: 8 additions & 2 deletions src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Net.Http;
using System.Threading.Tasks;
using OctoshiftCLI.Services;

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Using directive is unnecessary.

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Using directive is unnecessary.

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Using directive is unnecessary.
using Xunit;
using Xunit.Abstractions;

Expand All @@ -7,8 +9,10 @@
[Collection("Integration Tests")]
public class AdoBasicToGithub : AdoToGithub
{
public AdoBasicToGithub(ITestOutputHelper output) : base(output)
public AdoBasicToGithub(ITestOutputHelper output) : base(output) { }
protected override HttpClient CreateGithubHttpClient()
{
return new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 15 in src/OctoshiftCLI.IntegrationTests/AdoBasicToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)
}

[Fact]
Expand Down Expand Up @@ -39,7 +43,9 @@
await Helper.CreatePipeline(adoOrg, teamProject2, adoRepo2, pipeline2, commitId);
});

await Helper.RunAdoToGithubCliMigration($"generate-script --github-org {githubOrg} --ado-org {adoOrg} --all", Tokens);
await Helper.RunAdoToGithubCliMigration(
$"generate-script --github-org {githubOrg} --ado-org {adoOrg} --all",
Tokens);

Helper.AssertNoErrorInLogs(StartTime);

Expand Down
11 changes: 9 additions & 2 deletions src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Net.Http;
using System.Threading.Tasks;
using OctoshiftCLI.Services;

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Using directive is unnecessary.

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Using directive is unnecessary.

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Using directive is unnecessary.
using Xunit;
using Xunit.Abstractions;

Expand All @@ -7,8 +9,11 @@
[Collection("Integration Tests")]
public class AdoCsvToGithub : AdoToGithub
{
public AdoCsvToGithub(ITestOutputHelper output) : base(output)
public AdoCsvToGithub(ITestOutputHelper output) : base(output) { }

protected override HttpClient CreateGithubHttpClient()
{
return new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/OctoshiftCLI.IntegrationTests/AdoCsvToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)
}

[Fact]
Expand Down Expand Up @@ -40,7 +45,9 @@
});

await Helper.RunCliCommand($"ado2gh inventory-report --ado-org {adoOrg}", "gh", Tokens);
await Helper.RunAdoToGithubCliMigration($"generate-script --github-org {githubOrg} --ado-org {adoOrg} --all --repo-list repos.csv", Tokens);
await Helper.RunAdoToGithubCliMigration(
$"generate-script --github-org {githubOrg} --ado-org {adoOrg} --all --repo-list repos.csv",
Tokens);

Helper.AssertNoErrorInLogs(StartTime);

Expand Down
10 changes: 8 additions & 2 deletions src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Net.Http;
using System.Threading.Tasks;
using OctoshiftCLI.Services;

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Using directive is unnecessary.

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Using directive is unnecessary.

Check warning on line 3 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Using directive is unnecessary.
using Xunit;
using Xunit.Abstractions;

Expand All @@ -9,8 +11,10 @@
{
private const string ADO_SERVER_URL = "http://octoshift-ado-server-2022.eastus.cloudapp.azure.com/";

public AdoServerToGithub(ITestOutputHelper output) : base(output, ADO_SERVER_URL, "ADO_SERVER_PAT")
public AdoServerToGithub(ITestOutputHelper output) : base(output, ADO_SERVER_URL, "ADO_SERVER_PAT") { }
protected override HttpClient CreateGithubHttpClient()
{
return new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in src/OctoshiftCLI.IntegrationTests/AdoServerToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)
}

[Fact(Skip = "ADO Server is not a supported feature in GEI")]
Expand Down Expand Up @@ -41,7 +45,9 @@
await Helper.CreatePipeline(adoOrg, teamProject2, adoRepo2, pipeline2, commitId, ADO_SERVER_URL);
});

await Helper.RunAdoToGithubCliMigration($"generate-script --github-org {githubOrg} --ado-org {adoOrg} --ado-server-url {ADO_SERVER_URL} --download-migration-logs --create-teams --link-idp-groups", Tokens);
await Helper.RunAdoToGithubCliMigration(
$"generate-script --github-org {githubOrg} --ado-org {adoOrg} --ado-server-url {ADO_SERVER_URL} --download-migration-logs --create-teams --link-idp-groups",
Tokens);

Helper.AssertNoErrorInLogs(StartTime);

Expand Down
5 changes: 4 additions & 1 deletion src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
protected Dictionary<string, string> Tokens { get; }
protected DateTime StartTime { get; }

protected virtual HttpClient CreateGithubHttpClient() => new HttpClient();

protected AdoToGithub(ITestOutputHelper output, string adoServerUrl = "https://dev.azure.com", string adoPatEnvVar = "ADO_PAT")
{
StartTime = DateTime.Now;
Expand All @@ -33,7 +35,8 @@
var adoApi = new AdoApi(adoClient, adoServerUrl, logger);

var githubToken = Environment.GetEnvironmentVariable("GHEC_PAT");
_githubHttpClient = new HttpClient();
_githubHttpClient = CreateGithubHttpClient();

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Do not call overridable methods in constructors

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Do not call overridable methods in constructors

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Do not call overridable methods in constructors

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

Check warning on line 38 in src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

Do not call overridable methods in constructors (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214)

var githubClient = new GithubClient(logger, _githubHttpClient, new VersionChecker(_versionClient, logger), new RetryPolicy(logger), new DateTimeProvider(), githubToken);
var githubApi = new GithubApi(githubClient, "https://api.github.com", new RetryPolicy(logger), null);

Expand Down
3 changes: 1 addition & 2 deletions src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
_sourceBbsHttpClient = new HttpClient();
_sourceBbsClient = new BbsClient(_logger, _sourceBbsHttpClient, new VersionChecker(_versionClient, _logger), new RetryPolicy(_logger), sourceBbsUsername, sourceBbsPassword);

_targetGithubHttpClient = new HttpClient();
_targetGithubHttpClient = new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 61 in src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)
_targetGithubClient = new GithubClient(_logger, _targetGithubHttpClient, new VersionChecker(_versionClient, _logger), new RetryPolicy(_logger), new DateTimeProvider(), targetGithubToken);
var retryPolicy = new RetryPolicy(_logger);
_archiveUploader = new ArchiveUploader(_targetGithubClient, UPLOADS_URL, _logger, retryPolicy);
Expand Down Expand Up @@ -154,7 +154,6 @@
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 () =>
{
Expand Down
8 changes: 5 additions & 3 deletions src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@

_versionClient = new HttpClient();
var retryPolicy = new RetryPolicy(logger);
_archiveUploader = new ArchiveUploader(_targetGithubClient, UPLOADS_URL, logger, retryPolicy);

_sourceGithubHttpClient = new HttpClient();
// Source GitHub client (GHES)
_sourceGithubHttpClient = new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 54 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)
_sourceGithubClient = new GithubClient(logger, _sourceGithubHttpClient, new VersionChecker(_versionClient, logger), new RetryPolicy(logger), new DateTimeProvider(), sourceGithubToken);
_archiveUploader = new ArchiveUploader(_sourceGithubClient, UPLOADS_URL, logger, retryPolicy);
_sourceGithubApi = new GithubApi(_sourceGithubClient, GHES_API_URL, new RetryPolicy(logger), _archiveUploader);

_targetGithubHttpClient = new HttpClient();
// Target GitHub client (GHEC)
_targetGithubHttpClient = new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 60 in src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)
_targetGithubClient = new GithubClient(logger, _targetGithubHttpClient, new VersionChecker(_versionClient, logger), new RetryPolicy(logger), new DateTimeProvider(), targetGithubToken);
_targetGithubApi = new GithubApi(_targetGithubClient, "https://api.github.com", new RetryPolicy(logger), _archiveUploader);

Expand Down
17 changes: 14 additions & 3 deletions src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@
var githubToken = Environment.GetEnvironmentVariable("GHEC_PAT");
_tokens = new Dictionary<string, string> { ["GH_PAT"] = githubToken };

_githubHttpClient = new HttpClient();

_githubHttpClient = new HttpClient(new SecondaryRateLimitHandler(new HttpClientHandler()), disposeHandler: true);

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (ubuntu-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoCsv)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, AdoBasic)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (windows-latest, Ghes)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 35 in src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs

View workflow job for this annotation

GitHub Actions / e2e-test (macos-latest, Github)

The type or namespace name 'SecondaryRateLimitHandler' could not be found (are you missing a using directive or an assembly reference?)

_versionClient = new HttpClient();
_githubClient = new GithubClient(logger, _githubHttpClient, new VersionChecker(_versionClient, logger), new RetryPolicy(logger), new DateTimeProvider(), githubToken);
_githubClient = new GithubClient(
logger,
_githubHttpClient,
new VersionChecker(_versionClient, logger),
new RetryPolicy(logger),
new DateTimeProvider(),
githubToken);

_githubApi = new GithubApi(_githubClient, "https://api.github.com", new RetryPolicy(logger), null);

_helper = new TestHelper(_output, _githubApi, _githubClient);
Expand All @@ -58,7 +67,9 @@
await _helper.CreateGithubRepo(githubSourceOrg, repo2);
});

await _helper.RunGeiCliMigration($"generate-script --github-source-org {githubSourceOrg} --github-target-org {githubTargetOrg} --download-migration-logs", _tokens);
await _helper.RunGeiCliMigration(
$"generate-script --github-source-org {githubSourceOrg} --github-target-org {githubTargetOrg} --download-migration-logs",
_tokens);

_helper.AssertNoErrorInLogs(_startTime);

Expand Down
Loading