• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThreeMammals / Ocelot / 26241073880

21 May 2026 05:06PM UTC coverage: 95.327% (+0.6%) from 94.721%
26241073880

push

github

raman-m
Ref SDK 10.0.300 (Runtime 10.0.8) to release Ocelot v25 beta 3 and Ocelot.Testing v25 beta 8+ (#2389)

* Prepare to release Ocelot.Testing v25.0.0-beta.8 package
* Bump all packages to the latest versions, including .NET SDK 10.0.203 (Runtime 10.0.7) released April 21, 2026
* Migrate unit testing from VSTest framework to Microsoft.Testing.Platform
* Do not use 'Cake Build' step in PR workflow, use plain dotnet scripting instead
* Fix "Unit Tests" step in PR workflow
* Rename job to "build" since it's not Cake anymore
* Suppress non-zero result and check test running status
* Update "Acceptance Tests" step
* Don't collect Coverlet code coverage data in "Acceptance Tests" step
* Update prepare-coveralls.sh
* Prepare Coveralls script v2
* Prepare Coveralls script v3
* Prepare Coveralls script v4
* Prepare Coveralls script v5 -> Add 2nd BUILD_CONFIGURATION argument
* Upgrade to SDK 10.0.300 aka Runtime 10.0.8
* Update samples
* Update workflows: prefer plain dotnet scripting over Cake Build

6752 of 7083 relevant lines covered (95.33%)

2730.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.95
src/Ocelot/DownstreamPathManipulation/Middleware/ClaimsToDownstreamPathMiddleware.cs
1
using Microsoft.AspNetCore.Http;
2
using Ocelot.Logging;
3
using Ocelot.Middleware;
4
using Ocelot.PathManipulation;
5

6
namespace Ocelot.DownstreamPathManipulation.Middleware;
7

8
public class ClaimsToDownstreamPathMiddleware : OcelotMiddleware
9
{
10
    private readonly RequestDelegate _next;
11
    private readonly IChangeDownstreamPathTemplate _changeDownstreamPathTemplate;
12

13
    public ClaimsToDownstreamPathMiddleware(RequestDelegate next,
14
        IOcelotLoggerFactory loggerFactory,
15
        IChangeDownstreamPathTemplate changeDownstreamPathTemplate)
16
            : base(loggerFactory.CreateLogger<ClaimsToDownstreamPathMiddleware>())
7✔
17
    {
7✔
18
        _next = next;
7✔
19
        _changeDownstreamPathTemplate = changeDownstreamPathTemplate;
7✔
20
    }
7✔
21

22
    public async Task Invoke(HttpContext httpContext)
23
    {
1✔
24
        var downstreamRoute = httpContext.Items.DownstreamRoute();
1✔
25

26
        if (downstreamRoute.ClaimsToPath.Any())
1✔
27
        {
1✔
28
            Logger.LogInformation(() => $"{downstreamRoute.DownstreamPathTemplate.Value} has instructions to convert claims to path");
1✔
29

30
            var templatePlaceholderNameAndValues = httpContext.Items.TemplatePlaceholderNameAndValues();
1✔
31

32
            var response = _changeDownstreamPathTemplate.ChangeDownstreamPath(downstreamRoute.ClaimsToPath, httpContext.User.Claims,
1✔
33
                downstreamRoute.DownstreamPathTemplate, templatePlaceholderNameAndValues);
1✔
34

35
            if (response.IsError)
1✔
36
            {
×
37
                Logger.LogWarning("there was an error setting queries on context, setting pipeline error");
×
38

39
                httpContext.Items.UpsertErrors(response.Errors);
×
40
                return;
×
41
            }
42
        }
1✔
43

44
        await _next.Invoke(httpContext);
1✔
45
    }
1✔
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc