@joebigelow / wix-1 / commits / e115df73

Add failing test for ServiceInstall.

Sean Hall committed Sep 30, 2019 at 12:09 UTC e115df736067e5d765350f5335b1766663d91a9b
3 files changed +45
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+33
@@ -513,6 +513,39 @@ namespace WixToolsetTest.CoreIntegration
513 }
514 }
515
516 + [Fact(Skip = "Test demonstrates failure")]
517 + public void PopulatesServiceInstallTable()
518 + {
519 + var folder = TestData.Get(@"TestData");
520 +
521 + using (var fs = new DisposableFileSystem())
522 + {
523 + var baseFolder = fs.GetFolder();
524 + var intermediateFolder = Path.Combine(baseFolder, "obj");
525 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
526 +
527 + var result = WixRunner.Execute(new[]
528 + {
529 + "build",
530 + Path.Combine(folder, "ServiceInstall", "OwnProcess.wxs"),
531 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
532 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
533 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
534 + "-intermediateFolder", intermediateFolder,
535 + "-o", msiPath
536 + });
537 +
538 + result.AssertSuccess();
539 +
540 + Assert.True(File.Exists(msiPath));
541 + var results = Query.QueryDatabase(msiPath, new[] { "ServiceInstall" });
542 + Assert.Equal(new[]
543 + {
544 + "ServiceInstall:SampleService\tSampleService\t\t16\t4\t0\t\t\t\t\t\ttest.txt\t",
545 + }, results);
546 + }
547 + }
548 +
549 [Fact(Skip = "Test demonstrates failure")]
550 public void PopulatesUpgradeTableFromManualUpgrade()
551 {
src/test/WixToolsetTest.CoreIntegration/TestData/ServiceInstall/OwnProcess.wxs new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <ComponentGroup Id="ProductComponents">
5 + <Component Directory="INSTALLFOLDER">
6 + <File Source="test.txt" />
7 + <ServiceInstall Name="SampleService" ErrorControl="ignore" Start="disabled" Type="ownProcess"></ServiceInstall>
8 + </Component>
9 + </ComponentGroup>
10 + </Fragment>
11 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -29,6 +29,7 @@
29 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\ReserveCost\ReserveCost.wxs" CopyToOutputDirectory="PreserveNewest" />
32 + <Content Include="TestData\ServiceInstall\OwnProcess.wxs" CopyToOutputDirectory="PreserveNewest" />
33 <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" />
34 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
35 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />