8000 Add test coverage for Registry by jeffbi · Pull Request #4354 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Add test coverage for Registry #4354

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 4 commits into from
Aug 2, 2017
Merged

Add test coverage for Registry #4354

merged 4 commits into from
Aug 2, 2017

Conversation

jeffbi
Copy link
Contributor
@jeffbi jeffbi commented Jul 26, 2017

Addresses parts of #4148

Add coverage for Get-Item, Get-ChildItem, Set-Item, and Clear-Item

Add coverage for Get-Item, Get-ChildItem, Set-Item, and Clear-Item
@SteveL-MSFT
Copy link
Member
SteveL-MSFT commented Jul 27, 2017

Missing tests:

  • invalid hive root
  • validate -whatif works for set-item and clear-item
  • attempt accessing path you don't have access to

@jeffbi
Copy link
Contributor Author
jeffbi commented Jul 28, 2017

@SteveL-MSFT These test run with the tag RequireAdminOnWindows. Is there a Registry path that admin would not have access to?

@SteveL-MSFT
Copy link
Member

@jeffbi try HKLM:\sam

Copy link
Member
@adityapatwardhan adityapatwardhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment

@@ -125,6 +169,22 @@ Describe "Basic Registry Provider Tests" -Tags @("CI", "RequireAdminOnWindows")
$property."$testPropertyName" | Should Be 0
}

It "Verity Clear-Item" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo Verity->Verify

$key.Property.Length | Should BeExactly 0
}

It "Verity Clear-Item with -WhatIf" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here has well Verify

@jeffbi
Copy link
Contributor Author
jeffbi commented Jul 28, 2017

Typos fixed.

The Travis failure seems to be in a test for Invoke-Item.

@SteveL-MSFT
Copy link
Member
SteveL-MSFT commented Jul 28, 2017

@jeffbi I have a PR to change the invoke-item tests to Feature as they shouldn't be CI anyways, I'll restart the Mac job, there's a chance it'll pass as it's a timing issue

Copy link
Member
@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan adityapatwardhan merged commit 19fcd43 into PowerShell:master Aug 2, 2017
@jeffbi jeffbi deleted the tests-4148-registry branch August 2, 2017 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0