diff --git a/sdk/storage/azure-storage-blobs/test/ut/CMakeLists.txt b/sdk/storage/azure-storage-blobs/test/ut/CMakeLists.txt index f669593c8..22fbf507a 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/CMakeLists.txt +++ b/sdk/storage/azure-storage-blobs/test/ut/CMakeLists.txt @@ -32,6 +32,7 @@ add_executable ( macro_guard.cpp page_blob_client_test.cpp page_blob_client_test.hpp + simplified_header_test.cpp storage_retry_policy_test.cpp storage_timeout_test.cpp # Include shared test source code diff --git a/sdk/storage/azure-storage-blobs/test/ut/simplified_header_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/simplified_header_test.cpp new file mode 100644 index 000000000..d7a1a2880 --- /dev/null +++ b/sdk/storage/azure-storage-blobs/test/ut/simplified_header_test.cpp @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#include + +#include + +namespace Azure { namespace Storage { namespace Test { + + TEST(SimplifiedHeader, StorageBlobs) + { + Azure::Storage::Blobs::BlobServiceClient serviceClient("https://account.blob.core.windows.net"); + Azure::Storage::Blobs::BlobContainerClient containerClient( + "https://account.blob.core.windows.net/container"); + Azure::Storage::Blobs::BlobClient blobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::BlockBlobClient blockBlobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::PageBlobClient pageBlobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::AppendBlobClient appendBlobClinet( + "https://account.blob.core.windows.net/container/blob"); + Azure::Storage::Blobs::BlobLeaseClient leaseClient( + containerClient, Azure::Storage::Blobs::BlobLeaseClient::CreateUniqueLeaseId()); + + Azure::Storage::Sas::BlobSasBuilder sasBuilder; + + StorageSharedKeyCredential keyCredential("account", "key"); + + try + { + } + catch (Azure::Storage::StorageException& e) + { + std::cout << e.what() << std::endl; + } + } + +}}} // namespace Azure::Storage::Test diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/CMakeLists.txt b/sdk/storage/azure-storage-files-datalake/test/ut/CMakeLists.txt index a4e87d601..1612ff780 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/CMakeLists.txt +++ b/sdk/storage/azure-storage-files-datalake/test/ut/CMakeLists.txt @@ -29,6 +29,7 @@ add_executable ( datalake_service_client_test.cpp datalake_service_client_test.hpp macro_guard.cpp + simplified_header_test.cpp # Include shared test source code ${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/simplified_header_test.cpp b/sdk/storage/azure-storage-files-datalake/test/ut/simplified_header_test.cpp new file mode 100644 index 000000000..71f6f3578 --- /dev/null +++ b/sdk/storage/azure-storage-files-datalake/test/ut/simplified_header_test.cpp @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#include + +#include + +namespace Azure { namespace Storage { namespace Test { + + TEST(SimplifiedHeader, StorageFilesDataLake) + { + Azure::Storage::Files::DataLake::DataLakeServiceClient serviceClient( + "https://account.blob.core.windows.net"); + Azure::Storage::Files::DataLake::DataLakeFileSystemClient containerClient( + "https://account.dfs.core.windows.net/container"); + Azure::Storage::Files::DataLake::DataLakePathClient pathClinet( + "https://account.dfs.core.windows.net/container/path"); + Azure::Storage::Files::DataLake::DataLakeFileClient fileClinet( + "https://account.dfs.core.windows.net/container/path"); + Azure::Storage::Files::DataLake::DataLakeDirectoryClient dirClinet( + "https://account.dfs.core.windows.net/container/path"); + Azure::Storage::Files::DataLake::DataLakeLeaseClient leaseClient( + containerClient, + Azure::Storage::Files::DataLake::DataLakeLeaseClient::CreateUniqueLeaseId()); + + Azure::Storage::Sas::DataLakeSasBuilder sasBuilder; + + StorageSharedKeyCredential keyCredential("account", "key"); + + try + { + } + catch (Azure::Storage::StorageException& e) + { + std::cout << e.what() << std::endl; + } + } + +}}} // namespace Azure::Storage::Test diff --git a/sdk/storage/azure-storage-files-shares/test/ut/CMakeLists.txt b/sdk/storage/azure-storage-files-shares/test/ut/CMakeLists.txt index c239f97ed..39fd73312 100644 --- a/sdk/storage/azure-storage-files-shares/test/ut/CMakeLists.txt +++ b/sdk/storage/azure-storage-files-shares/test/ut/CMakeLists.txt @@ -27,6 +27,7 @@ add_executable ( share_sas_test.cpp share_service_client_test.cpp share_service_client_test.hpp + simplified_header_test.cpp # Include shared test source code ${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp diff --git a/sdk/storage/azure-storage-files-shares/test/ut/simplified_header_test.cpp b/sdk/storage/azure-storage-files-shares/test/ut/simplified_header_test.cpp new file mode 100644 index 000000000..5858cb894 --- /dev/null +++ b/sdk/storage/azure-storage-files-shares/test/ut/simplified_header_test.cpp @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#include + +#include + +namespace Azure { namespace Storage { namespace Test { + + TEST(SimplifiedHeader, StorageFilesShares) + { + Azure::Storage::Files::Shares::ShareServiceClient serviceClient( + "https://account.blob.core.windows.net"); + Azure::Storage::Files::Shares::ShareClient shareClient( + "https://account.file.core.windows.net/share"); + Azure::Storage::Files::Shares::ShareFileClient fileClient( + "https://account.file.core.windows.net/share/file"); + Azure::Storage::Files::Shares::ShareDirectoryClient dirClient( + "https://account.file.core.windows.net/share/dir"); + + Azure::Storage::Files::Shares::ShareLeaseClient leaseClient( + shareClient, Azure::Storage::Files::Shares::ShareLeaseClient::CreateUniqueLeaseId()); + + Azure::Storage::Sas::ShareSasBuilder sasBuilder; + + StorageSharedKeyCredential keyCredential("account", "key"); + + try + { + } + catch (Azure::Storage::StorageException& e) + { + std::cout << e.what() << std::endl; + } + } + +}}} // namespace Azure::Storage::Test diff --git a/sdk/storage/azure-storage-queues/test/ut/CMakeLists.txt b/sdk/storage/azure-storage-queues/test/ut/CMakeLists.txt index 4c1e8b6ec..03f4c578e 100644 --- a/sdk/storage/azure-storage-queues/test/ut/CMakeLists.txt +++ b/sdk/storage/azure-storage-queues/test/ut/CMakeLists.txt @@ -22,6 +22,7 @@ add_executable ( queue_client_test.hpp queue_sas_test.cpp queue_service_client_test.cpp + simplified_header_test.cpp # Include shared test source code ${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../azure-storage-common/test/ut/test_base.hpp diff --git a/sdk/storage/azure-storage-queues/test/ut/simplified_header_test.cpp b/sdk/storage/azure-storage-queues/test/ut/simplified_header_test.cpp new file mode 100644 index 000000000..364faf645 --- /dev/null +++ b/sdk/storage/azure-storage-queues/test/ut/simplified_header_test.cpp @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#include + +#include + +namespace Azure { namespace Storage { namespace Test { + + TEST(SimplifiedHeader, StorageQueues) + { + Azure::Storage::Queues::QueueServiceClient serviceClient( + "https://account.blob.core.windows.net"); + Azure::Storage::Queues::QueueClient containerClient( + "https://account.queue.core.windows.net/queue"); + + Azure::Storage::Sas::QueueSasBuilder sasBuilder; + + StorageSharedKeyCredential keyCredential("account", "key"); + + try + { + } + catch (Azure::Storage::StorageException& e) + { + std::cout << e.what() << std::endl; + } + } + +}}} // namespace Azure::Storage::Test