diff options
-rw-r--r-- | src/main.test/Tests/InstallationPluginTests/ScriptPluginTests.cs | 3 | ||||
-rw-r--r-- | src/main/Plugins/TargetPlugins/IISBinding/IISBinding.cs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main.test/Tests/InstallationPluginTests/ScriptPluginTests.cs b/src/main.test/Tests/InstallationPluginTests/ScriptPluginTests.cs index 7244acc..274233f 100644 --- a/src/main.test/Tests/InstallationPluginTests/ScriptPluginTests.cs +++ b/src/main.test/Tests/InstallationPluginTests/ScriptPluginTests.cs @@ -64,13 +64,14 @@ namespace PKISharp.WACS.UnitTests.Tests.InstallationPluginTests var store = new CertificateStore(log, iis, storeOptions); var oldCert = cs.RequestCertificate(null, RunLevel.Unattended, renewal, new Target() { CommonName = "test.local" }, null); var newCert = cs.RequestCertificate(null, RunLevel.Unattended, renewal, new Target() { CommonName = "test.local" }, null); + newCert.StoreInfo.Add(typeof(CertificateStore), new StoreInfo() { }); var options = new ScriptOptions { Script = script, ScriptParameters = parameters }; var installer = new Script(renewal, options, log); - installer.Install(store, newCert, oldCert); + installer.Install(new[] { store }, newCert, oldCert); } [TestMethod] diff --git a/src/main/Plugins/TargetPlugins/IISBinding/IISBinding.cs b/src/main/Plugins/TargetPlugins/IISBinding/IISBinding.cs index 251e14d..b6125cc 100644 --- a/src/main/Plugins/TargetPlugins/IISBinding/IISBinding.cs +++ b/src/main/Plugins/TargetPlugins/IISBinding/IISBinding.cs @@ -32,7 +32,7 @@ namespace PKISharp.WACS.Plugins.TargetPlugins _log.Error("Binding {binding} not yet found in IIS, create it or use the Manual target plugin instead", _options.Host); return null; } - else if (!allBindings.Any(b => b.SiteId == _options.SiteId)) + else if (!matchingBindings.Any(b => b.SiteId == _options.SiteId)) { var newMatch = matchingBindings.First(); _log.Warning("Binding {binding} moved from site {a} to site {b}", _options.Host, _options.SiteId, newMatch.SiteId); |