Rig.TUnit.Storage.AzureBlob
0.1.0-beta.2
dotnet add package Rig.TUnit.Storage.AzureBlob --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Storage.AzureBlob -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Storage.AzureBlob" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Storage.AzureBlob" Version="0.1.0-beta.2" />
<PackageReference Include="Rig.TUnit.Storage.AzureBlob" />
paket add Rig.TUnit.Storage.AzureBlob --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Storage.AzureBlob, 0.1.0-beta.2"
#:package Rig.TUnit.Storage.AzureBlob@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Storage.AzureBlob&version=0.1.0-beta.2&prerelease
#tool nuget:?package=Rig.TUnit.Storage.AzureBlob&version=0.1.0-beta.2&prerelease
Rig.TUnit.Storage.AzureBlob
Azurite-backed Azure Blob Storage fixture with
BlobServiceClientand pure-functionAzureBlobSasBuilderfor SAS query construction.
What this package is
The Rig.TUnit Azure Blob provider. AzureBlobFixture spins
mcr.microsoft.com/azure-storage/azurite via Testcontainers and
exposes a ready BlobServiceClient. AzureBlobSasBuilder is a pure
function that constructs SAS query strings from container/blob/
permission/TTL — no side effects, unit-testable.
When to use it
- Integration tests for blob storage upload / download / listing.
- Testing SAS token construction against Azurite.
- Verifying container lifecycle operations.
- Not for: production Azure testing — Azurite diverges on CORS, soft-delete, and change feed.
Prerequisites
- .NET 10 SDK
- Docker Desktop / Colima (Azurite image ~180 MB)
Azure.Storage.Blobs(transitive)
Quick start
using Rig.TUnit.Storage.AzureBlob.Fixtures;
await using var fx = new AzureBlobFixture();
await fx.InitializeAsync();
var container = fx.Client.GetBlobContainerClient("demo");
await container.CreateIfNotExistsAsync();
Options
| Property | Type | Default | Description |
|---|---|---|---|
Image |
string |
"mcr.microsoft.com/azure-storage/azurite:latest" |
Azurite image |
StartupTimeoutSeconds |
int |
60 |
Azurite boot |
AccountName |
string |
"devstoreaccount1" |
Azurite default dev account |
AccountKey |
string |
"Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" |
Well-known Azurite key |
Fixture + helper APIs
Rig.TUnit.Storage.AzureBlob.Fixtures.AzureBlobFixtureRig.TUnit.Storage.AzureBlob.Options.AzureBlobFixtureOptionsRig.TUnit.Storage.AzureBlob.Builder.AzureBlobRigBuilderRig.TUnit.Storage.AzureBlob.Helpers.AzureBlobSasBuilder
Per-test isolation
Per-test container: test-{IsolationKey:short}. Teardown deletes the
container recursively. Blob operations go inside that container so
parallel tests cannot collide.
Parallelism + performance
- First-run pull: ~20 s.
- Warm startup: ~5 s.
- Per-test container create + delete: ~50 ms.
- Per-blob upload/download: ~5–10 ms.
- Parallelism: 8+ concurrent tests.
Troubleshooting
ArgumentException: Invalid storage account name— the connection string must beUseDevelopmentStorage=trueor the explicit Azurite format. Don't substitute a real account name.- SAS signature mismatch — Azurite uses the well-known dev key by
default;
AzureBlobSasBuilderreads it from options.
See docs/troubleshooting.md#azureblob.
Provider quirks + edge cases
- Azurite diverges from real Azure on: soft-delete, change feed, CORS pre-flight. Tests relying on these must run against real Azure.
- SAS timestamps are UTC; building one with local time fails signature
validation.
AzureBlobSasBuilderalways normalises to UTC.
Benchmarks
See AzureBlobBenchmarks.cs;
baseline in benchmarks/baseline-005.json.
Related docs
- Architecture diagram
- Glossary
- Family base:
Rig.TUnit.Storage
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Azure.Storage.Blobs (>= 12.23.0)
- Bogus (>= 35.6.1)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Rig.TUnit.Storage (>= 0.1.0-beta.2)
- Testcontainers (>= 4.11.0)
- Testcontainers.Azurite (>= 4.11.0)
- TUnit.Core (>= 1.34.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rig.TUnit.Storage.AzureBlob:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 47 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 46 | 4/26/2026 |