Skip to content

Commit 8154d1d

Browse files
authored
new proxy nugets to support v3 (#5050)
1 parent 1513cc8 commit 8154d1d

File tree

3 files changed

+31
-38
lines changed

3 files changed

+31
-38
lines changed

src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<ItemGroup>
6060
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" />
6161
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
62-
<PackageReference Include="Microsoft.Azure.AppService.Proxy.Client" Version="2.0.8100001-0126c21e" />
62+
<PackageReference Include="Microsoft.Azure.AppService.Proxy.Client" Version="2.0.10120001-f33e57bd" />
6363
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.0.3" />
6464
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="3.0.14" />
6565
<PackageReference Include="Microsoft.Azure.WebJobs.Logging" Version="3.0.14" />
@@ -111,12 +111,8 @@
111111

112112
<!-- Remove all worker items from the ReadyToRun publish list -->
113113
<Target Name="ExcludeWorkersFromReadyToRun" BeforeTargets="_PrepareForReadyToRunCompilation">
114-
<CreateItem
115-
Include="@(ResolvedFileToPublish)"
116-
Condition="$([System.String]::new('%(ResolvedFileToPublish.TargetPath)').StartsWith('workers'))" >
117-
<Output
118-
TaskParameter="Include"
119-
ItemName="_ExcludeFromReadyToRun" />
114+
<CreateItem Include="@(ResolvedFileToPublish)" Condition="$([System.String]::new('%(ResolvedFileToPublish.TargetPath)').StartsWith('workers'))">
115+
<Output TaskParameter="Include" ItemName="_ExcludeFromReadyToRun" />
120116
</CreateItem>
121117

122118
<ItemGroup>
@@ -126,11 +122,8 @@
126122

127123
<!-- Add all worker items back to the publish list -->
128124
<Target Name="IncludeWorkersInPublish" AfterTargets="CreateReadyToRunImages">
129-
<CreateItem
130-
Include="@(_ExcludeFromReadyToRun)">
131-
<Output
132-
TaskParameter="Include"
133-
ItemName="ResolvedFileToPublish" />
125+
<CreateItem Include="@(_ExcludeFromReadyToRun)">
126+
<Output TaskParameter="Include" ItemName="ResolvedFileToPublish" />
134127
</CreateItem>
135128
</Target>
136129

src/WebJobs.Script/WebJobs.Script.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<ItemGroup>
3535
<PackageReference Include="Google.Protobuf" Version="3.7.0" />
3636
<PackageReference Include="Grpc.Core" Version="1.20.1" />
37-
<PackageReference Include="Microsoft.Azure.AppService.Proxy.Client" Version="2.0.8100001-0126c21e" />
37+
<PackageReference Include="Microsoft.Azure.AppService.Proxy.Client" Version="2.0.10120001-f33e57bd" />
3838
<PackageReference Include="Microsoft.Azure.Functions.JavaWorker" Version="1.5.2-SNAPSHOT" />
3939
<PackageReference Include="Microsoft.Azure.Functions.NodeJsWorker" Version="1.1.1" />
4040
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker" Version="1.0.188" />

test/WebJobs.Script.Tests.Integration/WebHostEndToEnd/ProxyEndToEndTests.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public ProxyEndToEndTests(TestFixture fixture)
3636
_settingsManager = ScriptSettingsManager.Instance;
3737
}
3838

39-
[Fact(Skip = "Skipping proxy tests")]
39+
[Fact]
4040
public async Task ListFunctions_Proxies_Succeeds()
4141
{
4242
// get functions including proxies
@@ -66,7 +66,7 @@ public async Task ListFunctions_Proxies_Succeeds()
6666
Assert.Equal(3, metadata.Length);
6767
}
6868

69-
[Fact(Skip = "Skipping proxy tests")]
69+
[Fact]
7070
public async Task Proxy_Invoke_Succeeds()
7171
{
7272
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"/mymockhttp");
@@ -75,7 +75,7 @@ public async Task Proxy_Invoke_Succeeds()
7575
Assert.Equal(response.Headers.GetValues("myversion").ToArray()[0], "123");
7676
}
7777

78-
[Theory(Skip = "Skipping proxy tests")]
78+
[Theory]
7979
[InlineData("test.txt")]
8080
[InlineData("test.asp")]
8181
[InlineData("test.aspx")]
@@ -92,7 +92,7 @@ public async Task File_Extensions_Test(string fileName)
9292
Assert.Equal("test", content);
9393
}
9494

95-
[Fact(Skip = "Skipping proxy tests")]
95+
[Fact]
9696
public async Task RootCheck()
9797
{
9898
HttpResponseMessage response = await _fixture.HttpClient.GetAsync("/");
@@ -102,7 +102,7 @@ public async Task RootCheck()
102102
Assert.Equal("Root", content);
103103
}
104104

105-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
105+
[Fact]
106106
public async Task LocalFunctionCall()
107107
{
108108
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"myhttptrigger");
@@ -112,7 +112,7 @@ public async Task LocalFunctionCall()
112112
Assert.Equal("Pong", content);
113113
}
114114

115-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
115+
[Fact]
116116
public async Task LocalFunctionCallWithAuth()
117117
{
118118
string functionKey = await _fixture.GetFunctionSecretAsync("PingAuth");
@@ -124,7 +124,7 @@ public async Task LocalFunctionCallWithAuth()
124124
Assert.Equal("Pong", content);
125125
}
126126

127-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
127+
[Fact]
128128
public async Task LocalFunctionInfiniteRedirectTest()
129129
{
130130
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"api/myloop");
@@ -134,7 +134,7 @@ public async Task LocalFunctionInfiniteRedirectTest()
134134
Assert.True(content.Contains("Infinite loop"));
135135
}
136136

137-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
137+
[Fact]
138138
public async Task LocalFunctionCallWithoutProxy()
139139
{
140140
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"api/Ping");
@@ -144,7 +144,7 @@ public async Task LocalFunctionCallWithoutProxy()
144144
Assert.Equal("Pong", content);
145145
}
146146

147-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
147+
[Fact]
148148
public async Task LocalFunctionRouteCallWithoutProxy()
149149
{
150150
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"api/myroute/mysubroute");
@@ -154,7 +154,7 @@ public async Task LocalFunctionRouteCallWithoutProxy()
154154
Assert.Equal("Pong", content);
155155
}
156156

157-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
157+
[Fact]
158158
public async Task LocalFunctionCallForNonAlphanumericProxyName()
159159
{
160160
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"MyHttpWithNonAlphanumericProxyName");
@@ -164,7 +164,7 @@ public async Task LocalFunctionCallForNonAlphanumericProxyName()
164164
Assert.Equal("Pong", content);
165165
}
166166

167-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
167+
[Fact]
168168
public async Task CatchAllApis()
169169
{
170170
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"api/proxy/blahblah");
@@ -174,7 +174,7 @@ public async Task CatchAllApis()
174174
Assert.Equal("Pong", content);
175175
}
176176

177-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
177+
[Fact]
178178
public async Task ColdStartRequest()
179179
{
180180
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "api/proxy/blahblah");
@@ -186,7 +186,7 @@ public async Task ColdStartRequest()
186186
Assert.Equal("Pong", content);
187187
}
188188

189-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
189+
[Fact]
190190
//backend set as constant - no trailing slash should be added
191191
public async Task TrailingSlashRemoved()
192192
{
@@ -198,7 +198,7 @@ public async Task TrailingSlashRemoved()
198198
Assert.Equal(@"http://localhost/api/myroute/mysubroute?a=1", content);
199199
}
200200

201-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
201+
[Fact]
202202
//backend ended with simple param - no trailing slash should be added
203203
public async Task TrailingSlashRemoved2()
204204
{
@@ -210,7 +210,7 @@ public async Task TrailingSlashRemoved2()
210210
Assert.Equal(@"http://localhost/api/myroute/mysubroute?a=1", content);
211211
}
212212

213-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
213+
[Fact]
214214
//backend path ended with wildcard param - slash should be kept
215215
public async Task TrailingSlashKept()
216216
{
@@ -222,7 +222,7 @@ public async Task TrailingSlashKept()
222222
Assert.Equal(@"http://localhost/api/myroute/mysubroute/?a=1", content);
223223
}
224224

225-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
225+
[Fact]
226226
//backend path ended with wildcard param - slash should be kept
227227
public async Task TrailingSlashKept2()
228228
{
@@ -234,7 +234,7 @@ public async Task TrailingSlashKept2()
234234
Assert.Equal(@"http://localhost/api/myroute/mysubroute?a=1", content);
235235
}
236236

237-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
237+
[Fact]
238238
public async Task CatchAllWithCustomRoutes()
239239
{
240240
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"proxy/api/myroute/mysubroute");
@@ -244,15 +244,15 @@ public async Task CatchAllWithCustomRoutes()
244244
Assert.Equal("Pong", content);
245245
}
246246

247-
[Fact(Skip = "Skipping proxy tests")]
247+
[Fact]
248248
public async Task CatchAllWithCustomRoutesWithInvalidVerb()
249249
{
250250
HttpResponseMessage response = await _fixture.HttpClient.PutAsync($"proxy/api/myroute/mysubroute", null);
251251

252252
Assert.Equal("404", response.StatusCode.ToString("D"));
253253
}
254254

255-
[Fact(Skip = "Skipping proxy tests")]
255+
[Fact]
256256
public async Task LongQueryString()
257257
{
258258
var longRoute = "/?q=test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234";
@@ -265,7 +265,7 @@ public async Task LongQueryString()
265265
Assert.Equal("200", response.StatusCode.ToString("D"));
266266
}
267267

268-
[Fact(Skip = "Skipping proxy tests")]
268+
[Fact]
269269
public async Task LongRoute()
270270
{
271271
var longRoute = "test123412341234123412341234123412341234123412341234123412341234123412341234123421341234123423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234213423141234123412341234123412341234123412341234123412341234123412341234123412341234123412341234";
@@ -278,7 +278,7 @@ public async Task LongRoute()
278278
Assert.Equal("200", response.StatusCode.ToString("D"));
279279
}
280280

281-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
281+
[Fact]
282282
public async Task ProxyCallingLocalProxy()
283283
{
284284
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"/pr1/api/Ping");
@@ -288,7 +288,7 @@ public async Task ProxyCallingLocalProxy()
288288
Assert.Equal("Pong", content);
289289
}
290290

291-
[Fact(Skip = "https://github.com/Azure/azure-functions-host/issues/4770")]
291+
[Fact]
292292
public async Task LocalFunctionCallBodyOverride()
293293
{
294294
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"/mylocalhttpoverride");
@@ -299,7 +299,7 @@ public async Task LocalFunctionCallBodyOverride()
299299
Assert.Equal("{\"test\":\"{}{123}\"}", content);
300300
}
301301

302-
[Fact(Skip = "Skipping proxy tests")]
302+
[Fact]
303303
public async Task ExternalCallBodyOverride()
304304
{
305305
HttpResponseMessage response = await _fixture.HttpClient.GetAsync($"/myexternalhttpoverride");
@@ -310,7 +310,7 @@ public async Task ExternalCallBodyOverride()
310310
Assert.Equal("{\"test\":\"123\"}", content);
311311
}
312312

313-
[Fact(Skip = "Skipping proxy tests")]
313+
[Fact]
314314
//"HEAD" request to proxy. backend returns 304 with no body but content-type shouldn't be null
315315
public async Task EmptyHeadReturnsContentType()
316316
{
@@ -324,7 +324,7 @@ public async Task EmptyHeadReturnsContentType()
324324
Assert.True(response.Headers.Contains("Test"));
325325
}
326326

327-
[Fact(Skip = "Skipping proxy tests")]
327+
[Fact]
328328
//"GET" request to proxy. backend returns 304 with no body so content-type should be null
329329
public async Task EmptyGetDoesntReturnsContentType()
330330
{

0 commit comments

Comments
 (0)