Skip to content

Commit

Permalink
[Storage] [WebJobs] Added test for Blob Path for various blob names t…
Browse files Browse the repository at this point in the history
…o check for blob name validation (Azure#45015)

* Added test for Blob Path for possible blob names, to ensure paths are not truncated

* CI changelog error

* Fix CI change log part 2
  • Loading branch information
amnguye authored and tejasm-microsoft committed Jul 22, 2024
1 parent 8456ad5 commit c5a85fe
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Breaking Changes

### Bugs Fixed
- Bumped version of Azure.Storage.Blobs to resolve issue where Blob Path was being truncated at '#' character.

### Other Changes

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Storage.Blobs;
using NUnit.Framework;

namespace Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Tests
{
public class BlobPathTests
{
[Test]
[TestCase("blobName")]
[TestCase("blob_Name")]
[TestCase("blob_Nam/e324324.txt")]
[TestCase("!*'();[]:@&%=+$,/#äÄöÖüÜß")]
public void BlobPathTryParseAbsUrl(string blobName)
{
string uriStr = "https://account.blob.core.windows.net/container/" + blobName;
if (BlobPath.TryParseAbsUrl(uriStr, out BlobPath path))
{
Assert.AreEqual(blobName, path.BlobName);
}
else
{
Assert.Fail("Failed to parse blob name");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Release History

## 5.0.0-beta.3 (2021-03-09)
- This release contains bug fixes to improve quality.
## 5.0.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 5.0.0-beta.2 (2021-02-09)
- This release contains bug fixes to improve quality.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Breaking Changes

### Bugs Fixed

- When grabbing Queue Metrics for amount of messages, will now use the QueueTriggerMetrics.QueueLength instead of the ApproximateMessagesCount for less stale metrics.
### Other Changes

## 5.3.0 (2024-04-18)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
# Release History

## 5.4.0-beta.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
Please refer to [`Microsoft.Azure.WebJobs.Extension.Storage.Blobs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md) and [`Microsoft.Azure.WebJobs.Extension.Storage.Queues`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md) for detailed list of changes.

## 5.3.0 (2024-04-18)
Please refer to [`Microsoft.Azure.WebJobs.Extension.Storage.Blobs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md) and [`Microsoft.Azure.WebJobs.Extension.Storage.Queues`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md) for detailed list of changes.
Expand Down

0 comments on commit c5a85fe

Please sign in to comment.