-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check connection string in StorageAccountDetails since its no longer …
…assigned any value in StorageConnectionString
- Loading branch information
1 parent
87d38a8
commit 32bb7ab
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using DurableTask.AzureStorage; | ||
using Microsoft.WindowsAzure.Storage; | ||
|
||
namespace Microsoft.Azure.WebJobs.Extensions.DurableTask.Tests | ||
{ | ||
internal class CustomTestStorageAccountProvider : IStorageAccountProvider | ||
{ | ||
private const string CustomConnectionString = "DefaultEndpointsProtocol=https;AccountName=test;AccountKey=dGVzdA==;EndpointSuffix=core.windows.net"; | ||
private readonly string customConnectionName; | ||
|
||
public CustomTestStorageAccountProvider(string connectionName) | ||
{ | ||
this.customConnectionName = connectionName; | ||
} | ||
|
||
public CloudStorageAccount GetCloudStorageAccount(string name) => | ||
CloudStorageAccount.Parse(name != this.customConnectionName ? TestHelpers.GetStorageConnectionString() : CustomConnectionString); | ||
|
||
public StorageAccountDetails GetStorageAccountDetails(string name) => | ||
new StorageAccountDetails { ConnectionString = name != this.customConnectionName ? TestHelpers.GetStorageConnectionString() : CustomConnectionString }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters