# Blob Storage

> Upload files to Blob Storage containers and check the blobs your services write there.

Source: https://axx.nimbusxr.us/references/steps/azure-blob/

Upload files to Blob Storage containers and check the blobs your services write there.

Register the storage account with `the {word} azure storage account with the following properties:` (the first account registered is the default), set up as the Azure SDK is set up for the real service:

| Property | |
| --- | --- |
| `connection string` | the account's connection string, e.g. `${env:AZURE_STORAGE_CONNECTION_STRING}`, or a local emulator's |
| `url` | the account's blob endpoint (`https://<account>.blob.core.windows.net`), signed in with the Azure default credential chain (environment, workload identity, managed identity, Azure CLI) |

Checks wait for the blob (10 seconds unless `within {duration}` says otherwise), since services write asynchronously. Values expand `${env:..}` and `${sys:..}`.

## `azure-blob.account`

```gherkin
Given the {word} azure storage account with the following properties:
  | ... | ... |
```

Register the storage account the blob steps talk to: `connection string`, or `url` with the Azure default credential chain.

**Parameters:** `{word}` (one word, no spaces)

**Example:**

```gherkin
Given the customs azure storage account with the following properties:
```

_Since 0.1.0._

## `azure-blob.upload`

```gherkin
When the {filepath} file is uploaded to the {word} blob container[[ as {word}]]
```

Upload a file (resolved against `resources`) to a blob container, named after the file or as given. The content type follows the file's extension.

**Variants** (optional parts in `[[...]]` above):

- `the {filepath} file is uploaded to the {word} blob container`
- `the {filepath} file is uploaded to the {word} blob container as {word}`

**Parameters:** `{filepath}` (A file of the project, without whitespace: a path relative to the `resources` directories or to the directory of axx.yaml, or an absolute path. Editors link it to the file), `{word}` (one word, no spaces)

**Example:**

```gherkin
When the invoices/kestrel-2026-09.csv file is uploaded to the declarations blob container
When the invoices/kestrel-2026-09.csv file is uploaded to the declarations blob container as incoming/kestrel-2026-09.csv
```

_Since 0.1.0._

## `azure-blob.has`

```gherkin
Then [[within {duration} ]]the {word} blob container has a(n) blob named {word}
```

Wait (10s, or the given time) until the blob container has an blob with that name.

**Variants** (optional parts in `[[...]]` above):

- `the {word} blob container has a(n) blob named {word}`
- `within {duration} the {word} blob container has a(n) blob named {word}`

**Parameters:** `{duration}` (A duration in seconds or minutes, e.g. `5s` or `2m`), `{word}` (one word, no spaces)

**Example:**

```gherkin
Then within 30s the declarations blob container has a(n) blob named disputes/kestrel-2026-09.csv
```

_Since 0.1.0._

## `azure-blob.identical`

```gherkin
Then [[within {duration} ]]the {word} blob in the {word} blob container is identical to the {filepath} file
```

Wait (10s, or the given time) until the blob exists with exactly the content of the file (resolved against `resources`).

**Variants** (optional parts in `[[...]]` above):

- `the {word} blob in the {word} blob container is identical to the {filepath} file`
- `within {duration} the {word} blob in the {word} blob container is identical to the {filepath} file`

**Parameters:** `{duration}` (A duration in seconds or minutes, e.g. `5s` or `2m`), `{word}` (one word, no spaces), `{filepath}` (A file of the project, without whitespace: a path relative to the `resources` directories or to the directory of axx.yaml, or an absolute path. Editors link it to the file)

**Example:**

```gherkin
Then the disputes/kestrel-2026-09.csv blob in the declarations blob container is identical to the expected/kestrel-disputes.csv file
```

_Since 0.1.0._

## `azure-blob.properties`

```gherkin
Then [[within {duration} ]]the {word} blob in the {word} blob container has the following properties:
  | ... | ... |
```

Wait (10s, or the given time) until the blob exists and its JSON content has the properties: `path | value` rows compared as text, `null` for null and `undefined` for absent, as in the other JSON property steps.

**Variants** (optional parts in `[[...]]` above):

- `the {word} blob in the {word} blob container has the following properties:`
- `within {duration} the {word} blob in the {word} blob container has the following properties:`

**Parameters:** `{duration}` (A duration in seconds or minutes, e.g. `5s` or `2m`), `{word}` (one word, no spaces)

**Example:**

```gherkin
Then the summaries/kestrel-2026-09.json blob in the declarations blob container has the following properties:
```

_Since 0.1.0._
