|
| 1 | +// ---------------------------------------------------------------------------------- |
| 2 | +// |
| 3 | +// Copyright Microsoft Corporation |
| 4 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +// you may not use this file except in compliance with the License. |
| 6 | +// You may obtain a copy of the License at |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// Unless required by applicable law or agreed to in writing, software |
| 9 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +// See the License for the specific language governing permissions and |
| 12 | +// limitations under the License. |
| 13 | +// ---------------------------------------------------------------------------------- |
| 14 | + |
| 15 | +using System; |
| 16 | +using System.Collections; |
| 17 | +using System.Collections.ObjectModel; |
| 18 | +using System.Management.Automation; |
| 19 | +using Xunit; |
| 20 | +using Xunit.Abstractions; |
| 21 | +using System.Diagnostics; |
| 22 | +using Microsoft.Azure.ServiceManagemenet.Common.Models; |
| 23 | +using Microsoft.WindowsAzure.Commands.ScenarioTest; |
| 24 | +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; |
| 25 | +using Microsoft.Azure.Management.Internal.Resources; |
| 26 | +using Microsoft.Azure.Management.Storage; |
| 27 | +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; |
| 28 | + |
| 29 | +namespace Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests |
| 30 | +{ |
| 31 | + public class StorageDataPlaneTests : RMTestBase |
| 32 | + { |
| 33 | + public XunitTracingInterceptor _logger; |
| 34 | + private string resourceGroupName; |
| 35 | + private string storageAccountName; |
| 36 | + |
| 37 | + public StorageDataPlaneTests(ITestOutputHelper output) |
| 38 | + { |
| 39 | + resourceGroupName = TestUtilities.GenerateName(); |
| 40 | + storageAccountName = "sto" + resourceGroupName; |
| 41 | + _logger = new XunitTracingInterceptor(output); |
| 42 | + XunitTracingInterceptor.AddToContext(_logger); |
| 43 | + } |
| 44 | + |
| 45 | + [Fact] |
| 46 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 47 | + public void TestBlob() |
| 48 | + { |
| 49 | + TestController.NewInstance.RunPsTest(_logger, $"Test-Blob -ResourceGroupName \"{resourceGroupName}\" -StorageAccountName \"{storageAccountName}\""); |
| 50 | + } |
| 51 | + |
| 52 | + [Fact] |
| 53 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 54 | + public void TestFile() |
| 55 | + { |
| 56 | + TestController.NewInstance.RunPsTest(_logger, $"Test-File -ResourceGroupName \"{resourceGroupName}\" -StorageAccountName \"{storageAccountName}\""); |
| 57 | + } |
| 58 | + |
| 59 | + [Fact] |
| 60 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 61 | + public void TestBlobFileCopy() |
| 62 | + { |
| 63 | + TestController.NewInstance.RunPsTest(_logger, $"Test-BlobFileCopy -ResourceGroupName \"{resourceGroupName}\" -StorageAccountName \"{storageAccountName}\""); |
| 64 | + } |
| 65 | + |
| 66 | + [Fact] |
| 67 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 68 | + public void TestTable() |
| 69 | + { |
| 70 | + TestController.NewInstance.RunPsTest(_logger, $"Test-Table -ResourceGroupName \"{resourceGroupName}\" -StorageAccountName \"{storageAccountName}\""); |
| 71 | + } |
| 72 | + |
| 73 | + [Fact] |
| 74 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 75 | + public void TestQueue() |
| 76 | + { |
| 77 | + TestController.NewInstance.RunPsTest(_logger, $"Test-Queue -ResourceGroupName \"{resourceGroupName}\" -StorageAccountName \"{storageAccountName}\""); |
| 78 | + } |
| 79 | + |
| 80 | + [Fact] |
| 81 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 82 | + public void TestCommon() |
| 83 | + { |
| 84 | + TestController.NewInstance.RunPsTest(_logger, $"Test-Common -ResourceGroupName \"{resourceGroupName}\" -StorageAccountName \"{storageAccountName}\""); |
| 85 | + } |
| 86 | + } |
| 87 | +} |
0 commit comments