Rig.TUnit.Storage.AzureBlob 0.1.0-beta.2

This is a prerelease version of Rig.TUnit.Storage.AzureBlob.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rig.TUnit.Storage.AzureBlob" Version="0.1.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rig.TUnit.Storage.AzureBlob" Version="0.1.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Rig.TUnit.Storage.AzureBlob" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rig.TUnit.Storage.AzureBlob --version 0.1.0-beta.2
                    
#r "nuget: Rig.TUnit.Storage.AzureBlob, 0.1.0-beta.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rig.TUnit.Storage.AzureBlob@0.1.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rig.TUnit.Storage.AzureBlob&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rig.TUnit.Storage.AzureBlob&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Tool

Rig.TUnit.Storage.AzureBlob

Azurite-backed Azure Blob Storage fixture with BlobServiceClient and pure-function AzureBlobSasBuilder for 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.AzureBlobFixture
  • Rig.TUnit.Storage.AzureBlob.Options.AzureBlobFixtureOptions
  • Rig.TUnit.Storage.AzureBlob.Builder.AzureBlobRigBuilder
  • Rig.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 be UseDevelopmentStorage=true or the explicit Azurite format. Don't substitute a real account name.
  • SAS signature mismatch — Azurite uses the well-known dev key by default; AzureBlobSasBuilder reads 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. AzureBlobSasBuilder always normalises to UTC.

Benchmarks

See AzureBlobBenchmarks.cs; baseline in benchmarks/baseline-005.json.

License

MIT. See LICENSE.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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