-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Features: - Toolkit: Operations (patch files) are now part of Toolkit - AutoFieldSpec: patch file for `QueryCdmMssqlLogShippingTargets` - AutoFieldSpec: patch file for `QueryMssqlDatabaseLiveMounts` - [README](https://github.com/rubrikinc/rubrik-powershell-sdk/blob/devel/Toolkit/Operations/README.md) on how to write patch files. Fixes: - Fix for queries that return a single interface object. See `Tests/unit/Sla.Tests.ps1`. (implemented with _type composition_ in the C# core)
- Loading branch information
Showing
22 changed files
with
612 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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
1 change: 1 addition & 0 deletions
1
RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/DebuggerScripts/.gitignore
This file contains 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 @@ | ||
debugconfig.json |
This file contains 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
12 changes: 0 additions & 12 deletions
12
RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/DebuggerScripts/debugconfig.json
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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 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,56 @@ | ||
<# | ||
.SYNOPSIS | ||
Run tests around SLAs | ||
.DESCRIPTION | ||
This file is the companion to the Sla.Tests.ps1 file in the unit folder. | ||
This file tests if the query runs correctly. | ||
It does not test the integrity of the query. | ||
See Tests/unit/Sla.Tests.ps1 for testing the integrity of the query. | ||
#> | ||
BeforeAll { | ||
. "$PSScriptRoot\..\E2eTestInit.ps1" | ||
} | ||
|
||
Describe -Name 'SLAs' -Fixture { | ||
It -Name 'SLA Domains' -Test { | ||
|
||
# ---------------------------------------------------------- | ||
# | ||
# 1. Retrieve the list of SLAs | ||
# | ||
# (list of 1 but still a list, not a single object) | ||
# ---------------------------------------------------------- | ||
|
||
$q1 = New-RscQuery -GqlQuery slaDomains -Var @{first = 1 } | ||
|
||
$r1 = $q1 | Invoke-Rsc | ||
$totalSlaCount = $r1.count | ||
$retrievedSlaCount = $r1.nodes.count | ||
$totalSlaCount | Should -BeGreaterOrEqual $retreivedSlaCount | ||
if ($retrievedSlaCount -ne 1) { | ||
Set-ItResult -Skipped -Because "This test needs at least 1 SLA to run" | ||
return | ||
} | ||
# The returned SLA object should be a SlaDomain-implementing object | ||
$implementingTypes = Get-RscHelp -Interface SlaDomain -ImplementingTypes | ||
$r1.Nodes | ForEach-Object { | ||
$implementingTypes | Should -Contain $_.GetType().Name | ||
} | ||
|
||
# ---------------------------------------------------------- | ||
# | ||
# 2. Retrieve a single SLA | ||
# | ||
# ---------------------------------------------------------- | ||
|
||
$slaId = $r1.nodes[0].id | ||
$q2 = New-RscQuery -GqlQuery slaDomain -Var @{id = $slaId } | ||
$r2 = $q2 | Invoke-Rsc | ||
$r2.Count | Should -Be 1 | ||
$implementingTypes | Should -Contain $r2.GetType().Name | ||
$r2.id | Should -Be $slaId | ||
} | ||
} |
This file contains 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
Oops, something went wrong.