diff options
author | Bob Arnson <bob@firegiant.com> | 2023-10-13 20:22:21 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2023-10-13 21:17:52 -0400 |
commit | f5e164d513772726ef409921672045ae9cb10e8b (patch) | |
tree | 94c1d95df0ce8e55cda33b038b87ba6167e54b7e /src | |
parent | 0014af66faa541f70f84b22dc7aa5eea0d524d37 (diff) | |
download | wix-f5e164d513772726ef409921672045ae9cb10e8b.tar.gz wix-f5e164d513772726ef409921672045ae9cb10e8b.tar.bz2 wix-f5e164d513772726ef409921672045ae9cb10e8b.zip |
Add cert and x64 tests.
Diffstat (limited to 'src')
3 files changed, 41 insertions, 17 deletions
diff --git a/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs b/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs index 28334bfa..ab3f35d9 100644 --- a/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs +++ b/src/ext/Iis/test/WixToolsetTest.Iis/IisExtensionFixture.cs | |||
@@ -11,14 +11,15 @@ namespace WixToolsetTest.Iis | |||
11 | public class IisExtensionFixture | 11 | public class IisExtensionFixture |
12 | { | 12 | { |
13 | [Fact] | 13 | [Fact] |
14 | public void CanBuildUsingIIsWebAddress() | 14 | public void CanBuildUsingIIs() |
15 | { | 15 | { |
16 | var folder = TestData.Get(@"TestData\UsingIis"); | 16 | var folder = TestData.Get(@"TestData\UsingIis"); |
17 | var build = new Builder(folder, typeof(IisExtensionFactory), new[] { folder }); | 17 | var build = new Builder(folder, typeof(IisExtensionFactory), new[] { folder }); |
18 | 18 | ||
19 | var results = build.BuildAndQuery(Build, validate: true, "Wix4IIsWebSite", "Wix4IIsWebAddress"); | 19 | var results = build.BuildAndQuery(Build, validate: true, "Wix4Certificate", "Wix4CertificateHash", "Wix4IIsWebSite", "Wix4IIsWebAddress"); |
20 | WixAssert.CompareLineByLine(new[] | 20 | WixAssert.CompareLineByLine(new[] |
21 | { | 21 | { |
22 | "Wix4Certificate:Certificate.MyCert\tMyCert\tMyCert certificate\t2\tTrustedPublisher\t14\tMyCertBits\t\t", | ||
22 | "Wix4IIsWebAddress:TestAddress\tTest\t\t[PORT]\t\t0", | 23 | "Wix4IIsWebAddress:TestAddress\tTest\t\t[PORT]\t\t0", |
23 | "Wix4IIsWebSite:Test\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tTest web server\t\tTestWebSiteProductDirectory\t2\t2\tTestAddress\tReadAndExecute\t\t\t\t", | 24 | "Wix4IIsWebSite:Test\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tTest web server\t\tTestWebSiteProductDirectory\t2\t2\tTestAddress\tReadAndExecute\t\t\t\t", |
24 | }, results); | 25 | }, results); |
@@ -26,7 +27,14 @@ namespace WixToolsetTest.Iis | |||
26 | 27 | ||
27 | private static void Build(string[] args) | 28 | private static void Build(string[] args) |
28 | { | 29 | { |
29 | WixRunner.Execute(args).AssertSuccess(); | 30 | var newArgs = args.ToList(); |
31 | |||
32 | if (args.First() == "build") | ||
33 | { | ||
34 | newArgs.AddRange(new[] { "-arch", "x64" }); | ||
35 | } | ||
36 | |||
37 | WixRunner.Execute(newArgs.ToArray()).AssertSuccess(); | ||
30 | } | 38 | } |
31 | } | 39 | } |
32 | } | 40 | } |
diff --git a/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs b/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs index f36aafef..affcff26 100644 --- a/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs +++ b/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs | |||
@@ -1,4 +1,4 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200"> | 2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200"> |
3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | 3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> |
4 | 4 | ||
@@ -8,7 +8,7 @@ | |||
8 | </Package> | 8 | </Package> |
9 | 9 | ||
10 | <Fragment> | 10 | <Fragment> |
11 | <StandardDirectory Id="ProgramFilesFolder"> | 11 | <StandardDirectory Id="ProgramFiles6432Folder"> |
12 | <Directory Id="INSTALLFOLDER" Name="MsiPackage"> | 12 | <Directory Id="INSTALLFOLDER" Name="MsiPackage"> |
13 | <Directory Id="TestWebSiteProductDirectory" /> | 13 | <Directory Id="TestWebSiteProductDirectory" /> |
14 | </Directory> | 14 | </Directory> |
diff --git a/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs b/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs index 03203b50..128f7d0d 100644 --- a/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs +++ b/src/ext/Iis/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs | |||
@@ -1,16 +1,32 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" |
3 | xmlns:iis="http://wixtoolset.org/schemas/v4/wxs/iis"> | 3 | xmlns:iis="http://wixtoolset.org/schemas/v4/wxs/iis"> |
4 | <Fragment> | 4 | <Fragment> |
5 | <Property Id="PORT" Value="3062" /> | 5 | <Property Id="PORT" Value="3062" /> |
6 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 6 | |
7 | <Component> | 7 | <Binary Id="MyCertBits" SourceFile="example.txt" /> |
8 | <File Source="example.txt" /> | 8 | |
9 | <iis:WebSite Id="Test" Description="Test web server" Directory="TestWebSiteProductDirectory" AutoStart="yes" DirProperties="ReadAndExecute" ConfigureIfExists="no" > | 9 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
10 | <iis:WebAddress Id="TestAddress" Port="[PORT]" Secure="no" /> | 10 | <Component Id="MyCert" Guid=""> |
11 | </iis:WebSite> | 11 | <iis:Certificate |
12 | </Component> | 12 | Id="Certificate.MyCert" |
13 | </ComponentGroup> | 13 | Name="MyCert certificate" |
14 | <iis:WebDirProperties Id="ReadAndExecute" /> | 14 | Request="no" |
15 | </Fragment> | 15 | StoreLocation="localMachine" |
16 | StoreName="trustedPublisher" | ||
17 | Overwrite="yes" | ||
18 | BinaryRef="MyCertBits" /> | ||
19 | </Component> | ||
20 | |||
21 | <Component> | ||
22 | <File Source="example.txt" /> | ||
23 | |||
24 | <iis:WebSite Id="Test" Description="Test web server" Directory="TestWebSiteProductDirectory" AutoStart="yes" DirProperties="ReadAndExecute" ConfigureIfExists="no" > | ||
25 | <iis:WebAddress Id="TestAddress" Port="[PORT]" Secure="no" /> | ||
26 | </iis:WebSite> | ||
27 | </Component> | ||
28 | </ComponentGroup> | ||
29 | |||
30 | <iis:WebDirProperties Id="ReadAndExecute" /> | ||
31 | </Fragment> | ||
16 | </Wix> | 32 | </Wix> |