Skip to content

Commit

Permalink
fix ci failure....
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Oct 30, 2024
1 parent 4c1f70c commit 7007775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/generated/KiotaVersionGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
try
{
XmlDocument csproj = new XmlDocument();
projectDirectory = Path.Combine(projectDirectory, "..", "..", "..", "..", "Directory.Build.props");
projectDirectory = Path.Combine(projectDirectory, "..", "..", "..", "Directory.Build.props");
csproj.Load(projectDirectory);
var version = csproj.GetElementsByTagName("VersionPrefix")[0].InnerText;
string source = $@"// <auto-generated/>
Expand Down
3 changes: 3 additions & 0 deletions tests/http/httpClient/Middleware/AuthorizationHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public async Task AuthorizationHandlerShouldAddAuthHeaderIfNotPresent()
// Act
HttpResponseMessage response = await this._invoker.SendAsync(httpRequestMessage, new CancellationToken());
// Assert
Assert.NotNull(response.RequestMessage);
Assert.True(response.RequestMessage.Headers.Contains("Authorization"));
Assert.True(response.RequestMessage.Headers.GetValues("Authorization").Count() == 1);
Assert.Equal($"Bearer {_expectedAccessToken}", response.RequestMessage.Headers.GetValues("Authorization").First());
Expand All @@ -86,6 +87,7 @@ public async Task AuthorizationHandlerShouldNotAddAuthHeaderIfPresent()
HttpResponseMessage response = await this._invoker.SendAsync(httpRequestMessage, new CancellationToken());

// Assert
Assert.NotNull(response.RequestMessage);
Assert.True(response.RequestMessage.Headers.Contains("Authorization"));
Assert.True(response.RequestMessage.Headers.GetValues("Authorization").Count() == 1);
Assert.Equal($"Bearer existing", response.RequestMessage.Headers.GetValues("Authorization").First());
Expand All @@ -106,6 +108,7 @@ public async Task AuthorizationHandlerShouldAttemptCAEClaimsChallenge()
HttpResponseMessage response = await this._invoker.SendAsync(httpRequestMessage, new CancellationToken());

// Assert
Assert.NotNull(response.RequestMessage);
Assert.True(response.RequestMessage.Headers.Contains("Authorization"));
Assert.True(response.RequestMessage.Headers.GetValues("Authorization").Count() == 1);
Assert.Equal($"Bearer {_expectedAccessTokenAfterCAE}", response.RequestMessage.Headers.GetValues("Authorization").First());
Expand Down

0 comments on commit 7007775

Please sign in to comment.