Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
nytian committed Nov 4, 2024
1 parent 720b05f commit d02e3c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public async Task TestWaitForCompletionOrCreateCheckStatusResponseAsync_WhenRunn

// Assert the response content is not null and check the content is correct.
Assert.NotNull(payload);
AssertHttpManagementPayload(payload, "http://localhost:7075/runtime/webhooks/durabletask", instanceId);
AssertHttpManagementPayload(payload, "https://localhost:7075/runtime/webhooks/durabletask", instanceId);
}

/// <summary>
Expand Down Expand Up @@ -225,7 +225,7 @@ public async Task TestWaitForCompletionOrCreateCheckStatusResponseAsync_WhenFail
[InlineData("X-Forwarded-Proto", "https", "X-Forwarded-Host", "xforwarded.example.com", "https://xforwarded.example.com/runtime/webhooks/durabletask")]
[InlineData("", "", "X-Forwarded-Host", "test.net", "https://test.net/runtime/webhooks/durabletask")]
[InlineData("X-Original-Proto", "https", "X-Original-Host", "original.example.com", "https://original.example.com/runtime/webhooks/durabletask")]
[InlineData("", "", "", "", "http://localhost:7075/runtime/webhooks/durabletask")] // Default base URL for empty headers
[InlineData("", "", "", "", "https://localhost:7075/runtime/webhooks/durabletask")] // Default base URL for empty headers
public void TestHttpRequestDataForwardingHandling(string header1, string? value1, string header2, string value2, string expectedBaseUrl)
{
var headers = new HttpHeadersCollection();
Expand Down Expand Up @@ -307,7 +307,7 @@ private HttpRequestData MockHttpRequestAndResponseData(HttpHeadersCollection? he
var mockHttpRequestData = new Mock<HttpRequestData>(mockFunctionContext.Object);

// Set up the URL property.
mockHttpRequestData.SetupGet(r => r.Url).Returns(new Uri("http://localhost:7075/orchestrators/E1_HelloSequence"));
mockHttpRequestData.SetupGet(r => r.Url).Returns(new Uri("https://localhost:7075/orchestrators/E1_HelloSequence"));

// If headers are provided, use them, otherwise create a new empty HttpHeadersCollection
headers ??= new HttpHeadersCollection();
Expand Down

0 comments on commit d02e3c7

Please sign in to comment.