-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Correct stable and preview upgrade codes for MSI
#13036
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
9 commits
Select commit
Hold shift + click to select a range
46d264b
Correct stable and preview upgrade codes
TravisEz13 fd1b46c
Update Product.wxs
TravisEz13 2e9bd05
Add tests for upgrade code
TravisEz13 66d2919
Update msi.tests.ps1
TravisEz13 c6bd8f6
Update msi.tests.ps1
TravisEz13 e81f111
Update msi.tests.ps1
TravisEz13 a7681ac
Update msi.tests.ps1
TravisEz13 4d39e6b
Update msi.tests.ps1
TravisEz13 1744e7d
Update test/packaging/windows/msi.tests.ps1
adityapatwardhan 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,6 +80,34 @@ Describe -Name "Windows MSI" -Fixture { | |
| } | ||
| } | ||
|
|
||
| Context "Upgrade code" { | ||
| BeforeAll { | ||
| $previewUpgladeCode = '39243d76-adaf-42b1-94fb-16ecf83237c8' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we add tests for Preview why not for Release? If we add tests for x64 should we skip the tests on x86? |
||
| } | ||
adityapatwardhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| It "Preview MSI should not be installed before test" -Skip:(!(Test-Elevated)) { | ||
| $result = @(Get-CimInstance -Query "SELECT Value FROM Win32_Property WHERE Property='UpgradeCode' and Value = '{$previewUpgladeCode}'") | ||
| $result.Count | Should -Be 0 -Because 'Query should return nothing if preview x64 is not installed' | ||
| } | ||
|
|
||
| It "MSI should install without error" -Skip:(!(Test-Elevated)) { | ||
| { | ||
| Invoke-MsiExec -Install -MsiPath $msiX64Path -Properties @{ADD_PATH = 1} | ||
| } | Should -Not -Throw | ||
| } | ||
|
|
||
| It "Upgrade code should be correct" -Skip:(!(Test-Elevated)) { | ||
| $result = @(Get-CimInstance -Query "SELECT Value FROM Win32_Property WHERE Property='UpgradeCode' and Value = '{$previewUpgladeCode}'") | ||
| $result.Count | Should -Be 1 -Because 'Query should return 1 result if Upgrade code is for x64 preview' | ||
| } | ||
|
|
||
| It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { | ||
| { | ||
| Invoke-MsiExec -Uninstall -MsiPath $msiX64Path | ||
| } | Should -Not -Throw | ||
| } | ||
| } | ||
|
|
||
| Context "Add Path disabled" { | ||
| It "MSI should install without error" -Skip:(!(Test-Elevated)) { | ||
| { | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
From - https://github.com/PowerShell/PowerShell/pull/12792/files#r445866081
preview upgrade codes
release upgrade codes
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.
I'm curious where does
var.IsPreviewdeclared?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.
https://github.com/PowerShell/PowerShell/pull/12792/files#diff-edfc56f59d77ed8604989ab0efbff45cR3060