-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for installer properties override
- Loading branch information
1 parent
4f8406f
commit 429359f
Showing
3 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
216 changes: 216 additions & 0 deletions
216
src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.OverrideInstallerFields.yaml
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,216 @@ | ||
PackageIdentifier: TestPublisher.OverrideInstallerFields | ||
PackageVersion: 0.1.2 | ||
PackageName: Override installer level fields by root fields | ||
Publisher: Test publisher | ||
License: MIT | ||
ShortDescription: A manifest that verifies that installer level fields are overridden by root fields. | ||
Description: |- | ||
Expected flow: | ||
1) Installer level fields are overridden by root fields at the start of the update. | ||
2) The update flow modifies the installer level fields if needed. (e.g. ProductCode in case of MSI upgrade) | ||
3) At the end of the update, the common installer fields are moved to the root level. | ||
InstallerLocale: en-US | ||
InstallerType: zip | ||
NestedInstallerType: exe | ||
NestedInstallerFiles: | ||
- RelativeFilePath: WingetCreateTestExeInstaller.exe | ||
PortableCommandAlias: PortableCommandAlias1 | ||
AppsAndFeaturesEntries: | ||
- DisplayName: TestDisplayName1 | ||
Publisher: TestPublisher1 | ||
DisplayVersion: 1.0.1 | ||
ProductCode: TestProductCode1 | ||
UpgradeCode: TestUpgradeCode1 | ||
InstallerType: msi | ||
InstallerSwitches: | ||
Silent: /silent1 | ||
SilentWithProgress: /silentwithprogress1 | ||
Dependencies: | ||
PackageDependencies: | ||
- PackageIdentifier: TestPackageDependency1 | ||
MinimumVersion: 1.0.1 | ||
WindowsFeatures: | ||
- TestWindowsFeature1 | ||
ExternalDependencies: | ||
- TestExternalDependency1 | ||
WindowsLibraries: | ||
- TestWindowsLibrary1 | ||
ExpectedReturnCodes: | ||
- InstallerReturnCode: 1001 | ||
ReturnResponse: installInProgress | ||
MinimumOSVersion: 10.0.22000.0 | ||
PackageFamilyName: TestPackageFamilyName1 | ||
Platform: | ||
- Windows.Desktop | ||
Scope: machine | ||
UpgradeBehavior: install | ||
ElevationRequirement: elevationRequired | ||
Commands: | ||
- fakeCommand1 | ||
Protocols: | ||
- fakeProtocol1 | ||
FileExtensions: | ||
- .exe | ||
# Uncomment when installer model gets updated to support these fields | ||
#Markets: | ||
# AllowedMarkets: | ||
# - fakeAllowedMarket | ||
# ExcludedMarkets: | ||
# - fakeExcludedMarket | ||
InstallerAbortsTerminal: true | ||
InstallLocationRequired: true | ||
RequireExplicitUpgrade: true | ||
UnsupportedOSArchitectures: | ||
- arm64 | ||
DisplayInstallWarnings: true | ||
InstallerSuccessCodes: | ||
- 1 | ||
UnsupportedArguments: | ||
- log | ||
- location | ||
InstallationMetadata: | ||
DefaultInstallLocation: "%ProgramFiles%\\TestApp1" | ||
Files: | ||
- RelativeFilePath: "main1.exe" | ||
FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 | ||
FileType: launch | ||
InvocationParameter: "/arg1" | ||
Installers: | ||
- Architecture: x64 | ||
InstallerType: zip | ||
InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip | ||
InstallerSha256: 8A052767127A6E2058BAAE03B551A807777BB1B726650E2C7E92C3E92C8DF80D | ||
NestedInstallerType: msi | ||
NestedInstallerFiles: | ||
- RelativeFilePath: WingetCreateTestExeInstaller.exe | ||
PortableCommandAlias: PortableCommandAlias2 | ||
AppsAndFeaturesEntries: | ||
- DisplayName: TestDisplayName2 | ||
Publisher: TestPublisher2 | ||
DisplayVersion: 1.0.2 | ||
ProductCode: TestProductCode2 | ||
UpgradeCode: TestUpgradeCode2 | ||
InstallerType: exe | ||
InstallerSwitches: | ||
Silent: /silent2 | ||
SilentWithProgress: /silentwithprogress2 | ||
Dependencies: | ||
PackageDependencies: | ||
- PackageIdentifier: TestPackageDependency2 | ||
MinimumVersion: 1.0.2 | ||
WindowsFeatures: | ||
- TestWindowsFeature2 | ||
ExternalDependencies: | ||
- TestExternalDependency2 | ||
WindowsLibraries: | ||
- TestWindowsLibrary2 | ||
ExpectedReturnCodes: | ||
- InstallerReturnCode: 1002 | ||
ReturnResponse: installInProgress | ||
MinimumOSVersion: 10.0.17763.0 | ||
PackageFamilyName: TestPackageFamilyName2 | ||
Platform: | ||
- Windows.Universal | ||
Scope: user | ||
UpgradeBehavior: uninstallPrevious | ||
ElevationRequirement: elevatesSelf | ||
Commands: | ||
- fakeCommand2 | ||
Protocols: | ||
- fakeProtocol2 | ||
FileExtensions: | ||
- .msi | ||
# Uncomment when installer model gets updated to support these fields | ||
#Markets: | ||
# AllowedMarkets: | ||
# - fakeAllowedMarket | ||
# ExcludedMarkets: | ||
# - fakeExcludedMarket | ||
InstallerAbortsTerminal: false | ||
InstallLocationRequired: false | ||
RequireExplicitUpgrade: false | ||
UnsupportedOSArchitectures: | ||
- arm | ||
DisplayInstallWarnings: false | ||
InstallerSuccessCodes: | ||
- 2 | ||
UnsupportedArguments: | ||
- log | ||
InstallationMetadata: | ||
DefaultInstallLocation: "%ProgramFiles%\\TestApp2" | ||
Files: | ||
- RelativeFilePath: "main2.exe" | ||
FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 | ||
FileType: launch | ||
InvocationParameter: "/arg2" | ||
- Architecture: x86 | ||
InstallerType: zip | ||
InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip | ||
InstallerSha256: 8A052767127A6E2058BAAE03B551A807777BB1B726650E2C7E92C3E92C8DF80D | ||
NestedInstallerType: msi | ||
NestedInstallerFiles: | ||
- RelativeFilePath: WingetCreateTestExeInstaller.exe | ||
PortableCommandAlias: PortableCommandAlias2 | ||
AppsAndFeaturesEntries: | ||
- DisplayName: TestDisplayName2 | ||
Publisher: TestPublisher2 | ||
DisplayVersion: 1.0.2 | ||
ProductCode: TestProductCode2 | ||
UpgradeCode: TestUpgradeCode2 | ||
InstallerType: exe | ||
InstallerSwitches: | ||
Silent: /silent2 | ||
SilentWithProgress: /silentwithprogress2 | ||
Dependencies: | ||
PackageDependencies: | ||
- PackageIdentifier: TestPackageDependency2 | ||
MinimumVersion: 1.0.2 | ||
WindowsFeatures: | ||
- TestWindowsFeature2 | ||
ExternalDependencies: | ||
- TestExternalDependency2 | ||
WindowsLibraries: | ||
- TestWindowsLibrary2 | ||
ExpectedReturnCodes: | ||
- InstallerReturnCode: 1002 | ||
ReturnResponse: installInProgress | ||
MinimumOSVersion: 10.0.17763.0 | ||
PackageFamilyName: TestPackageFamilyName2 | ||
Platform: | ||
- Windows.Universal | ||
Scope: user | ||
UpgradeBehavior: uninstallPrevious | ||
ElevationRequirement: elevatesSelf | ||
Commands: | ||
- fakeCommand2 | ||
Protocols: | ||
- fakeProtocol2 | ||
FileExtensions: | ||
- .msi | ||
# Uncomment when installer model gets updated to support these fields | ||
#Markets: | ||
# AllowedMarkets: | ||
# - fakeAllowedMarket | ||
# ExcludedMarkets: | ||
# - fakeExcludedMarket | ||
InstallerAbortsTerminal: false | ||
InstallLocationRequired: false | ||
RequireExplicitUpgrade: false | ||
UnsupportedOSArchitectures: | ||
- arm | ||
DisplayInstallWarnings: false | ||
InstallerSuccessCodes: | ||
- 2 | ||
UnsupportedArguments: | ||
- log | ||
InstallationMetadata: | ||
DefaultInstallLocation: "%ProgramFiles%\\TestApp2" | ||
Files: | ||
- RelativeFilePath: "main2.exe" | ||
FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 | ||
FileType: launch | ||
InvocationParameter: "/arg2" | ||
PackageLocale: en-US | ||
ManifestType: singleton | ||
ManifestVersion: 1.4.0 |
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