Skip to content

Commit fad8443

Browse files
[SQL] Add Managed Database Log Replay service cmdlets (#12800)
* Initial commit * Recorded tests * Generated help files and change log * Renaming to Stop instead of Cancel, fix static analysis * Correct md files * Fixing test * Fix Security by Supressing the line * Fixing recoreded files * Trying to fix cred scan issue one more time * Filled missing docs in md files Co-authored-by: Milan Brkic <[email protected]>
1 parent 6712ed2 commit fad8443

26 files changed

+25234
-3
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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 Microsoft.Azure.Commands.ScenarioTest.SqlTests;
16+
using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework;
17+
using Xunit;
18+
using Xunit.Abstractions;
19+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
20+
21+
namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests
22+
{
23+
public class ManagedDatabaseLogReplayScenarioTest : SqlTestsBase
24+
{
25+
protected override void SetupManagementClients(RestTestFramework.MockContext context)
26+
{
27+
var sqlClient = GetSqlClient(context);
28+
var newResourcesClient = GetResourcesClient(context);
29+
var networkClient = GetNetworkClient(context);
30+
Helper.SetupSomeOfManagementClients(sqlClient, newResourcesClient, networkClient);
31+
}
32+
33+
public ManagedDatabaseLogReplayScenarioTest(ITestOutputHelper output) : base(output)
34+
{
35+
base.resourceTypesToIgnoreApiVersion = new string[] {
36+
"Microsoft.Sql/managedInstances",
37+
"Microsoft.Sql/managedInstances/databases"
38+
};
39+
}
40+
41+
[Fact]
42+
[Trait(Category.AcceptanceType, Category.CheckIn)]
43+
public void TestManagedDatabaseLogReplayService()
44+
{
45+
RunPowerShellTest("Test-ManagedDatabaseLogReplay");
46+
}
47+
48+
[Fact]
49+
[Trait(Category.AcceptanceType, Category.CheckIn)]
50+
public void TestCompleteManagedDatabaseLogReplayService()
51+
{
52+
RunPowerShellTest("Test-CompleteManagedDatabaseLogReplay");
53+
}
54+
55+
[Fact]
56+
[Trait(Category.AcceptanceType, Category.CheckIn)]
57+
public void TestCancelManagedDatabaseLogReplayService()
58+
{
59+
RunPowerShellTest("Test-CancelManagedDatabaseLogReplay");
60+
}
61+
62+
[Fact]
63+
[Trait(Category.AcceptanceType, Category.CheckIn)]
64+
public void TestPipingManagedDatabaseLogReplayService()
65+
{
66+
RunPowerShellTest("Test-ManagedDatabaseLogReplayPiping");
67+
}
68+
69+
[Fact]
70+
[Trait(Category.AcceptanceType, Category.CheckIn)]
71+
public void TestPipingCompleteCancelManagedDatabaseLogReplayService()
72+
{
73+
RunPowerShellTest("Test-PipingCompleteCancelManagedDatabaseLogReplay");
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)