Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:Azure/azure-powershell into dev
Browse files Browse the repository at this point in the history
Conflicts:
	src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
	src/ResourceManager/Sql/Commands.Sql.Test/packages.config
	src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
	src/ResourceManager/Sql/Commands.Sql/packages.config
  • Loading branch information
j82w committed Aug 14, 2015
2 parents 5e8afe7 + d2421d0 commit 3f8df93
Show file tree
Hide file tree
Showing 58 changed files with 27,164 additions and 29,601 deletions.
103 changes: 56 additions & 47 deletions src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.ScenarioTest.SqlTests;
using Microsoft.Azure.Test;
using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.ScenarioTest.SqlTests
namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests
{
public class SecurityTests : SqlTestsBase
public class AuditingTests : SqlTestsBase
{
protected Microsoft.Azure.Management.Storage.StorageManagementClient GetStorageV2Client()
{
Expand All @@ -34,195 +35,194 @@ protected Microsoft.Azure.Management.Storage.StorageManagementClient GetStorageV

protected override void SetupManagementClients()
{
var sqlCSMClient = GetSqlClient(); // to interact with the security endpoints
var sqlCSMClient = GetSqlClient();
var storageClient = GetStorageClient();
var storageV2Client = GetStorageV2Client();
var resourcesClient = GetResourcesClient();
var authorizationClient = GetAuthorizationManagementClient();
helper.SetupSomeOfManagementClients(sqlCSMClient, storageClient, storageV2Client, resourcesClient, authorizationClient);
}


[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyWithStorage()
public void TestAuditingDatabaseUpdatePolicyWithStorage()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyWithStorage");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithStorage");
}

[Fact(Skip="Non stable interaction between the test and the testing framework")]
[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyWithStorageV2()
public void TestAuditingDatabaseUpdatePolicyWithStorageV2()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyWithStorageV2");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithStorageV2");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerUpdatePolicyWithStorage()
public void TestAuditingServerUpdatePolicyWithStorage()
{
RunPowerShellTest("Test-ServerUpdatePolicyWithStorage");
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithStorage");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyWithEventTypes()
public void TestAuditingDatabaseUpdatePolicyWithEventTypes()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyWithEventTypes");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithEventTypes");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerUpdatePolicyWithEventTypes()
public void TestAuditingServerUpdatePolicyWithEventTypes()
{
RunPowerShellTest("Test-ServerUpdatePolicyWithEventTypes");
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithEventTypes");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDisableDatabaseAuditing()
public void TestAuditingDisableDatabaseAuditing()
{
RunPowerShellTest("Test-DisableDatabaseAuditing");
RunPowerShellTest("Test-AuditingDisableDatabaseAuditing");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDisableServerAuditing()
public void TestAuditingDisableServerAuditing()
{
RunPowerShellTest("Test-DisableServerAuditing");
RunPowerShellTest("Test-AuditingDisableServerAuditing");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseDisableEnableKeepProperties()
public void TestAuditingDatabaseDisableEnableKeepProperties()
{
RunPowerShellTest("Test-DatabaseDisableEnableKeepProperties");
RunPowerShellTest("Test-AuditingDatabaseDisableEnableKeepProperties");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerDisableEnableKeepProperties()
public void TestAuditingServerDisableEnableKeepProperties()
{
RunPowerShellTest("Test-ServerDisableEnableKeepProperties");
RunPowerShellTest("Test-AuditingServerDisableEnableKeepProperties");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestUseServerDefault()
public void TestAuditingUseServerDefault()
{
RunPowerShellTest("Test-UseServerDefault");
RunPowerShellTest("Test-AuditingUseServerDefault");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestFailedDatabaseUpdatePolicyWithNoStorage()
public void TestAuditingFailedDatabaseUpdatePolicyWithNoStorage()
{
RunPowerShellTest("Test-FailedDatabaseUpdatePolicyWithNoStorage");
RunPowerShellTest("Test-AuditingFailedDatabaseUpdatePolicyWithNoStorage");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestFailedServerUpdatePolicyWithNoStorage()
public void TestAuditingFailedServerUpdatePolicyWithNoStorage()
{
RunPowerShellTest("Test-FailedServerUpdatePolicyWithNoStorage");
RunPowerShellTest("Test-AuditingFailedServerUpdatePolicyWithNoStorage");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestFailedUseServerDefault()
public void TestAuditingFailedUseServerDefault()
{
RunPowerShellTest("Test-FailedUseServerDefault");
RunPowerShellTest("Test-AuditingFailedUseServerDefault");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyWithEventTypeShortcuts()
public void TestAuditingDatabaseUpdatePolicyWithEventTypeShortcuts()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyWithEventTypeShortcuts");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithEventTypeShortcuts");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerUpdatePolicyWithEventTypeShortcuts()
public void TestAuditingServerUpdatePolicyWithEventTypeShortcuts()
{
RunPowerShellTest("Test-ServerUpdatePolicyWithEventTypeShortcuts");
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithEventTypeShortcuts");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyKeepPreviousStorage()
public void TestAuditingDatabaseUpdatePolicyKeepPreviousStorage()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyKeepPreviousStorage");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyKeepPreviousStorage");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerUpdatePolicyKeepPreviousStorage()
public void TestAuditingServerUpdatePolicyKeepPreviousStorage()
{
RunPowerShellTest("Test-ServerUpdatePolicyKeepPreviousStorage");
RunPowerShellTest("Test-AuditingServerUpdatePolicyKeepPreviousStorage");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestFailWithBadDatabaseIndentity()
public void TestAuditingFailWithBadDatabaseIndentity()
{
RunPowerShellTest("Test-FailWithBadDatabaseIndentity");
RunPowerShellTest("Test-AuditingFailWithBadDatabaseIndentity");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestFailWithBadServerIndentity()
public void TestAuditingFailWithBadServerIndentity()
{
RunPowerShellTest("Test-FailWithBadServerIndentity");
RunPowerShellTest("Test-AuditingFailWithBadServerIndentity");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseStorageKeyRotation()
public void TestAuditingDatabaseStorageKeyRotation()
{
RunPowerShellTest("Test-DatabaseStorageKeyRotation");
RunPowerShellTest("Test-AuditingDatabaseStorageKeyRotation");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerStorageKeyRotation()
public void TestAuditingServerStorageKeyRotation()
{
RunPowerShellTest("Test-ServerStorageKeyRotation");
RunPowerShellTest("Test-AuditingServerStorageKeyRotation");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerUpdatePolicyWithRetention()
public void TestAuditingServerUpdatePolicyWithRetention()
{
RunPowerShellTest("Test-ServerUpdatePolicyWithRetention");
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithRetention");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyWithRetention()
public void TestAuditingDatabaseUpdatePolicyWithRetention()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyWithRetention");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithRetention");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestServerRetentionKeepProperties()
public void TestAuditingServerRetentionKeepProperties()
{
RunPowerShellTest("Test-ServerRetentionKeepProperties");
RunPowerShellTest("Test-AuditingServerRetentionKeepProperties");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseRetentionKeepProperties()
public void TestAuditingDatabaseRetentionKeepProperties()
{
RunPowerShellTest("Test-DatabaseRetentionKeepProperties");
RunPowerShellTest("Test-AuditingDatabaseRetentionKeepProperties");
}

[Fact]
[Trait(Category.Sql, Category.CheckIn)]
public void TestDatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion()
public void TestAuditingDatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion()
{
RunPowerShellTest("Test-DatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion");
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion");
}
}
}
Loading

0 comments on commit 3f8df93

Please sign in to comment.