diff --git a/src/functions/public/Get-Context.ps1 b/src/functions/public/Get-Context.ps1 index 9d8a66c..fdf6eca 100644 --- a/src/functions/public/Get-Context.ps1 +++ b/src/functions/public/Get-Context.ps1 @@ -16,7 +16,7 @@ Repositories : {@{Languages=System.Object[]; IsPrivate=False; Stars=130; CreatedDate=2/9/2024 10:45:11 AM; Name=Repo2}} AccessScopes : {repo, user, gist, admin:org} - AuthToken : ghp_12345ABCDE67890FGHIJ + AuthToken : MyFirstSuperSecretToken TwoFactorMethods : {TOTP, SMS} IsTwoFactorAuth : True ApiRateLimits : @{ResetTime=2/9/2025 11:15:11 AM; Remaining=4985; Limit=5000} @@ -30,7 +30,7 @@ Repositories : {@{Languages=System.Object[]; IsPrivate=False; Stars=130; CreatedDate=2/9/2024 10:45:11 AM; Name=Repo2}} AccessScopes : {repo, user, gist, admin:org} - AuthToken : ghp_12345ABCDE67890FGHIJ + AuthToken : MySuperSecretToken TwoFactorMethods : {TOTP, SMS} IsTwoFactorAuth : True ApiRateLimits : @{ResetTime=2/9/2025 11:15:11 AM; Remaining=4985; Limit=5000} @@ -103,9 +103,9 @@ } process { - Write-Debug "Retrieving contexts - ID: [$($ID -join ', ')]" + Write-Verbose "Retrieving contexts - ID: [$($ID -join ', ')]" foreach ($item in $ID) { - Write-Debug "Retrieving contexts - ID: [$item]" + Write-Verbose "Retrieving contexts - ID: [$item]" $script:Contexts.Values | Where-Object { $_.ID -like $item } | Select-Object -ExpandProperty Context } } diff --git a/src/functions/public/Get-ContextInfo.ps1 b/src/functions/public/Get-ContextInfo.ps1 index 64c87a9..c89a0e0 100644 --- a/src/functions/public/Get-ContextInfo.ps1 +++ b/src/functions/public/Get-ContextInfo.ps1 @@ -92,7 +92,7 @@ } process { - Write-Debug "Retrieving context info - ID: [$ID]" + Write-Verbose "Retrieving context info - ID: [$ID]" foreach ($item in $ID) { $script:Contexts.Values | Where-Object { $_.ID -like $item } | Select-Object -ExcludeProperty Context } diff --git a/src/functions/public/Remove-Context.ps1 b/src/functions/public/Remove-Context.ps1 index 7796eb2..f24ce43 100644 --- a/src/functions/public/Remove-Context.ps1 +++ b/src/functions/public/Remove-Context.ps1 @@ -97,9 +97,9 @@ process { foreach ($item in $ID) { - Write-Debug "Processing ID [$item]" + Write-Verbose "Processing ID [$item]" $script:Contexts.Keys | Where-Object { $_ -like $item } | ForEach-Object { - Write-Debug "Removing context [$_]" + Write-Verbose "Removing context [$_]" if ($PSCmdlet.ShouldProcess($_, 'Remove secret')) { $script:Contexts[$_].Path | Remove-Item -Force diff --git a/tests/Context.Tests.ps1 b/tests/Context.Tests.ps1 index fa487db..75d6ac4 100644 --- a/tests/Context.Tests.ps1 +++ b/tests/Context.Tests.ps1 @@ -18,7 +18,7 @@ BeforeAll { } Describe 'Functions' { - Get-Context 'Function: Set-Context' { + Context 'Function: Set-Context' { It "Set-Context -ID 'TestID1'" { { Set-Context -ID 'TestID1' } | Should -Not -Throw $result = Get-Context -ID 'TestID1' @@ -152,7 +152,7 @@ Describe 'Functions' { # } } - Get-Context 'Function: Get-Context' { + Context 'Function: Get-Context' { It 'Get-Context - Should return all contexts' { Write-Verbose (Get-Context | Out-String) -Verbose (Get-Context).Count | Should -Be 3 @@ -177,7 +177,7 @@ Describe 'Functions' { } } - Get-Context 'Function: Remove-Context' { + Context 'Function: Remove-Context' { It "Remove-Context -ID 'AContextID' - Should remove the context" { Get-Context | Remove-Context @@ -205,7 +205,7 @@ Describe 'Functions' { } } - Get-Context 'Function: Rename-Context' { + Context 'Function: Rename-Context' { BeforeEach { # Ensure no contexts exist before starting tests Get-Context | Remove-Context @@ -256,7 +256,7 @@ Describe 'Functions' { } # New tests to verify that pipeline input is fully supported - Get-Context 'Pipeline Input support' { + Context 'Pipeline Input support' { It 'Get-Context supports pipeline input as strings' { # Create two contexts to test pipeline input Set-Context -ID 'PipeContext1' -Context @{ Dummy = 1 }