public async Task ValidateConfiguration_IncorrectKey() { var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "bar"; serviceRuntime.Settings["DataConnectionString"] = "DefaultEndpointsProtocol=https;AccountName=orleanstest;AccountKey=IncorrectKey"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.False(ok); }
public async Task ValidateConfiguration_InvalidConnectionString() { var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "bar"; serviceRuntime.Settings["DataConnectionString"] = "InvalidConnectionString"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.False(ok); }
public async Task ValidateConfiguration_IncorrectKey() { var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "bar"; serviceRuntime.Settings["DataConnectionString"] = "DefaultEndpointsProtocol=https;AccountName=orleanstest;AccountKey=IncorrectKey"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime, this.loggerFactory); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.False(ok); }
public async Task ValidateConfiguration_InvalidConnectionString() { var serviceRuntime = new TestServiceRuntimeWrapper { DeploymentId = "bar" }; serviceRuntime.Settings["DataConnectionString"] = "InvalidConnectionString"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime, this.loggerFactory); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.False(ok); }
private async Task ValidateConfigurationAtStartup(string connectionString) { var serviceRuntime = new TestServiceRuntimeWrapper { DeploymentId = "foo" }; serviceRuntime.Settings["DataConnectionString"] = connectionString; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime, this.loggerFactory); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.True(ok); }
public async Task ValidateConfiguration_Startup() { Skip.IfNot(StorageEmulator.TryStart(), "This test explicitly requires the Azure Storage emulator to run"); var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "foo"; serviceRuntime.Settings["DataConnectionString"] = "UseDevelopmentStorage=true"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.True(ok); }
public async Task ValidateConfiguration_Startup() { Skip.IfNot(StorageEmulator.TryStart(), "This test explicitly requires the Azure Storage emulator to run"); var serviceRuntime = new TestServiceRuntimeWrapper(); serviceRuntime.DeploymentId = "foo"; serviceRuntime.Settings["DataConnectionString"] = "UseDevelopmentStorage=true"; serviceRuntime.InstanceName = "name"; var config = AzureSilo.DefaultConfiguration(serviceRuntime); config.AddMemoryStorageProvider(); AzureSilo orleansAzureSilo = new AzureSilo(serviceRuntime, this.loggerFactory); bool ok = await orleansAzureSilo.ValidateConfiguration(config); Assert.True(ok); }