-
Notifications
You must be signed in to change notification settings - Fork 4k
Add instance pool, instance pool usages cmdlets, and update managed instance cmdlets to support instance pools. #9744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9dcd58d
Update permissive record matcher, fix recording of TestGetManagedData…
efb2aa0
Updates to permissive record matcher to allow ignoring specific resou…
6d29512
Fixes to constructor / tests
7b6891f
Add instance pool and instance pool usages cmdlets
d51104e
Add scenario tests, instance pool tests, managed instance in instance…
6028fcc
Update get managed instance
28a0a7e
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
49b40c8
Update get azure sql managed instance cmdlet
08dc8f4
Updates to sql change log
7ef6198
Add updated and new cmdlet help files
7e88555
Merge branch 'master' into instancePoolsMaster
johnpaulkee b862d37
Update InstancePoolCrudTests.ps1 that had password warning not suppre…
6077627
Remove supports should process from GetAzureSqlInstancePoolUsage
e14e325
Update positions for RemoveAzureSqlManagedInstance
8d9d5d1
Add license headers and remove positional values for non mandatory pa…
2a3d1bd
Add license to instance pool crud tests, add default parameter sets t…
29eabfc
Update markdown help files and add online version
514cb03
Update to tests based on feedback
c2a4770
Update get sql instance
cb5cc3f
Updates post static analysis review
d1c6ce0
Reset breaking change to test build
da039b7
Add breaking changes
6447dd4
update breaking changes once more
401e987
Add table formats for pools and usages
c972fc5
Update permissive record matcher based on feedback
af5b8cc
Create new cloned permissive record matcher named permissive record m…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
src/Sql/Sql.Test/ScenarioTests/InstancePoolCrudTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using Microsoft.Azure.Commands.ScenarioTest.SqlTests; | ||
using Microsoft.WindowsAzure.Commands.ScenarioTest; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; | ||
|
||
namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests | ||
{ | ||
public class InstancePoolCrudTests : SqlTestsBase | ||
{ | ||
public InstancePoolCrudTests(ITestOutputHelper output) : base(output) | ||
{ | ||
} | ||
|
||
protected override void SetupManagementClients(RestTestFramework.MockContext context) | ||
{ | ||
var sqlClient = GetSqlClient(context); | ||
var newResourcesClient = GetResourcesClient(context); | ||
var networkClient = GetNetworkClient(context); | ||
Helper.SetupSomeOfManagementClients(sqlClient, newResourcesClient, networkClient); | ||
} | ||
|
||
#region Instance pool | ||
|
||
/// <summary> | ||
/// Tests creation of an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestCreateInstancePool() | ||
{ | ||
RunPowerShellTest("Test-CreateInstancePool"); | ||
} | ||
|
||
/// <summary> | ||
/// Tests updating an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestUpdateInstancePool() | ||
{ | ||
RunPowerShellTest("Test-UpdateInstancePool"); | ||
} | ||
|
||
/// <summary> | ||
/// Tests getting an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestGetInstancePool() | ||
{ | ||
RunPowerShellTest("Test-GetInstancePool"); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestRemoveInstancePool() | ||
{ | ||
RunPowerShellTest("Test-RemoveInstancePool"); | ||
} | ||
|
||
#endregion | ||
|
||
#region Managed Instance | ||
|
||
/// <summary> | ||
/// Tests creation of a managed instance in an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestCreateManagedInstanceInInstancePool() | ||
{ | ||
RunPowerShellTest("Test-CreateManagedInstanceInInstancePool"); | ||
} | ||
|
||
/// <summary> | ||
/// Tests getting all managed instances in an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestGetManagedInstanceInInstancePool() | ||
{ | ||
RunPowerShellTest("Test-GetManagedInstanceInInstancePool"); | ||
} | ||
|
||
/// <summary> | ||
/// Tests updating a managed instance in an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestUpdateManagedInstanceInInstancePool() | ||
{ | ||
RunPowerShellTest("Test-UpdateManagedInstanceInInstancePool"); | ||
} | ||
|
||
/// <summary> | ||
/// Tests updating a managed instance in an instance pool | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestDeleteManagedInstanceInInstancePool() | ||
{ | ||
RunPowerShellTest("Test-DeleteManagedInstanceInInstancePool"); | ||
} | ||
|
||
#endregion | ||
|
||
#region Instance Pool Usages | ||
|
||
/// <summary> | ||
/// Tests getting the instance pool usage | ||
/// </summary> | ||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void TestGetInstancePoolUsage() | ||
{ | ||
RunPowerShellTest("Test-GetInstancePoolUsage"); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnpaulkee TBD on this change 😁