Update serverless SDK version to 1.11.0-preview1-10835

Also fixed broken tests
This commit is contained in:
Zitong Yang 2021-08-30 18:11:23 +08:00
Родитель d2d5999be3
Коммит 7c8cb50389
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -5,7 +5,7 @@
</PropertyGroup>
<PropertyGroup Label="Package Versions">
<MicroBuildCorePackageVersion>0.3.0</MicroBuildCorePackageVersion>
<MicrosoftAzureSignalRManagement>1.9.1</MicrosoftAzureSignalRManagement>
<MicrosoftAzureSignalRManagement>1.11.0-preview1-10835</MicrosoftAzureSignalRManagement>
<MicrosoftAzureFunctionsExtensionsVersion>1.0.0</MicrosoftAzureFunctionsExtensionsVersion>
<MicrosoftNETTestSdkPackageVersion>15.8.0</MicrosoftNETTestSdkPackageVersion>
<MoqPackageVersion>4.9.0</MoqPackageVersion>

Просмотреть файл

@ -67,7 +67,7 @@ namespace SignalRServiceExtension.Tests
}))
.ConfigureWebJobs(b => b.AddSignalR()).Build();
var hubContext = await host.Services.GetRequiredService<IServiceManagerStore>().GetOrAddByConnectionStringKey("key").GetAsync("hubName") as ServiceHubContext;
await Assert.ThrowsAsync<AzureSignalRNotConnectedException>(() => hubContext.NegotiateAsync());
await Assert.ThrowsAsync<AzureSignalRNotConnectedException>(() => hubContext.NegotiateAsync().AsTask());
}
}
}
}

Просмотреть файл

@ -51,7 +51,7 @@ namespace SignalRServiceExtension.Tests.Trigger
[Fact]
public async Task ServerlessHubSyncNegotiate()
{
var hubContext = await new ServiceHubContextBuilder().WithOptions(o => o.ConnectionString = FakeEndpointUtils.GetFakeConnectionString(1).Single()).CreateAsync("hub", default);
var hubContext = await new ServiceManagerBuilder().WithOptions(o => o.ConnectionString = FakeEndpointUtils.GetFakeConnectionString(1).Single()).BuildServiceManager().CreateHubContextAsync("hub", default);
var serviceManager = Mock.Of<IServiceManager>();
var myHub = new MyHub(hubContext, serviceManager);
var connectionInfo = myHub.Negotiate("user");

Просмотреть файл

@ -18,10 +18,10 @@ namespace SignalRServiceExtension.Tests.Trigger
var connectionId = "0f9c97a2f0bf4706afe87a14e0797b11";
var accessKeys = new AccessKey[]
{
new AccessKey("7aab239577fd4f24bc919802fb629f5f","http://endpoint1",1),
new AccessKey("a5f2815d0d0c4b00bd27e832432f91ab","http://endpont2",1)
new AccessKey("https://endpoint1", "7aab239577fd4f24bc919802fb629f5f"),
new AccessKey("https://endpont2", "a5f2815d0d0c4b00bd27e832432f91ab")
};
var wrongAccessKeys = new AccessKey[] { new AccessKey(Guid.NewGuid().ToString(), "http://wrong", 1) };
var wrongAccessKeys = new AccessKey[] { new AccessKey("http://wrong", Guid.NewGuid().ToString()) };
var signatures = new string[]
{
"sha256=7767effcb3946f3e1de039df4b986ef02c110b1469d02c0a06f41b3b727ab561",