Skip to content

Commit

Permalink
Adjusted variable visiblity in AzuriteContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecole committed Sep 9, 2024
1 parent 5a9f8f1 commit e6320db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/Testcontainers.Azurite/AzuriteBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public sealed class AzuriteBuilder : ContainerBuilder<AzuriteBuilder, AzuriteCon

public const ushort TablePort = 10002;

public const string AccountName = "devstoreaccount1";

public const string AccountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";

private static readonly ISet<AzuriteService> EnabledServices = new HashSet<AzuriteService>();

static AzuriteBuilder()
Expand Down
14 changes: 5 additions & 9 deletions src/Testcontainers.Azurite/AzuriteContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ namespace Testcontainers.Azurite;
[PublicAPI]
public sealed class AzuriteContainer : DockerContainer
{
private const string AccountName = "devstoreaccount1";

private const string AccountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";

/// <summary>
/// Initializes a new instance of the <see cref="AzuriteContainer" /> class.
/// </summary>
Expand All @@ -25,11 +21,11 @@ public string GetConnectionString()
{
var properties = new Dictionary<string, string>();
properties.Add("DefaultEndpointsProtocol", Uri.UriSchemeHttp);
properties.Add("AccountName", AccountName);
properties.Add("AccountKey", AccountKey);
properties.Add("BlobEndpoint", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(AzuriteBuilder.BlobPort), AccountName).ToString());
properties.Add("QueueEndpoint", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(AzuriteBuilder.QueuePort), AccountName).ToString());
properties.Add("TableEndpoint", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(AzuriteBuilder.TablePort), AccountName).ToString());
properties.Add("AccountName", AzuriteBuilder.AccountName);
properties.Add("AccountKey", AzuriteBuilder.AccountKey);
properties.Add("BlobEndpoint", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(AzuriteBuilder.BlobPort), AzuriteBuilder.AccountName).ToString());
properties.Add("QueueEndpoint", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(AzuriteBuilder.QueuePort), AzuriteBuilder.AccountName).ToString());
properties.Add("TableEndpoint", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(AzuriteBuilder.TablePort), AzuriteBuilder.AccountName).ToString());
return string.Join(";", properties.Select(property => string.Join("=", property.Key, property.Value)));
}
}

0 comments on commit e6320db

Please sign in to comment.