diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-01-21 16:25:38 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-01-21 17:29:12 -0600 |
commit | af019d2b6d7b67df34355c038290d45366001ea9 (patch) | |
tree | 9e839496fc1a496a4b5d7e2fa8aa84b823e861b5 /src/test/burn/WixTestTools | |
parent | 613fe40c487e1cbec118167939c13546a3ce9e80 (diff) | |
download | wix-af019d2b6d7b67df34355c038290d45366001ea9.tar.gz wix-af019d2b6d7b67df34355c038290d45366001ea9.tar.bz2 wix-af019d2b6d7b67df34355c038290d45366001ea9.zip |
Add failing dependency E2E tests.
Diffstat (limited to 'src/test/burn/WixTestTools')
-rw-r--r-- | src/test/burn/WixTestTools/BundleVerifier.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs index db14c228..e0edb081 100644 --- a/src/test/burn/WixTestTools/BundleVerifier.cs +++ b/src/test/burn/WixTestTools/BundleVerifier.cs | |||
@@ -14,6 +14,7 @@ namespace WixTestTools | |||
14 | 14 | ||
15 | public partial class BundleInstaller | 15 | public partial class BundleInstaller |
16 | { | 16 | { |
17 | public const string DependencyRegistryRoot = "Software\\Classes\\Installer\\Dependencies"; | ||
17 | public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; | 18 | public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; |
18 | public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; | 19 | public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; |
19 | 20 | ||
@@ -134,6 +135,22 @@ namespace WixTestTools | |||
134 | Assert.Equal(cached, Directory.Exists(cachePath)); | 135 | Assert.Equal(cached, Directory.Exists(cachePath)); |
135 | } | 136 | } |
136 | 137 | ||
138 | public void VerifyPackageProviderRemoved(string packageId) | ||
139 | { | ||
140 | using var wixOutput = WixOutput.Read(this.BundlePdb); | ||
141 | var intermediate = Intermediate.Load(wixOutput); | ||
142 | var section = intermediate.Sections.Single(); | ||
143 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | ||
144 | var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId); | ||
145 | var registryRoot = packageSymbol.PerMachine == YesNoDefaultType.Yes ? Registry.LocalMachine : Registry.CurrentUser; | ||
146 | var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey); | ||
147 | using var registryKey = registryRoot.OpenSubKey(subkeyPath); | ||
148 | if (registryKey != null) | ||
149 | { | ||
150 | WixAssert.StringEqual(null, subkeyPath); | ||
151 | } | ||
152 | } | ||
153 | |||
137 | public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) | 154 | public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) |
138 | { | 155 | { |
139 | using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); | 156 | using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); |