From 20d9b695fcd890d9fe82bf1a31bb52906e18cfa6 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Mon, 1 Nov 2021 16:51:13 +0200 Subject: [PATCH 01/14] #613 Update validation messages in HostAvaiableValidator --- .../Validators/HostAvaiableValidator.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs index e8183fd4..11aed53d 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs @@ -1,16 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Net; -using System.Text; -using System.Threading.Tasks; -using SIM.Sitecore9Installer.Tasks; namespace SIM.Sitecore9Installer.Validation.Validators { public class HostAvaiableValidator : BaseValidator { - public override string SuccessMessage => "Host response is 200"; + public override string SuccessMessage => null; protected override IEnumerable GetErrorsForTask(Tasks.Task task, IEnumerable paramsToValidate) { @@ -29,13 +24,17 @@ protected override IEnumerable GetErrorsForTask(Tasks.Task tas if (error != null) { - yield return new ValidationResult(ValidatorState.Error, $"Unable to connect to host {p.Value}", error); + yield return new ValidationResult(ValidatorState.Error, $"Unable to connect to the following host:\n{p.Value}", error); yield break; } if (resp.StatusCode != HttpStatusCode.OK) { - yield return new ValidationResult(ValidatorState.Error, $"Host {p.Value} did not return 200.",null); + yield return new ValidationResult(ValidatorState.Error, $"The following host did not return status code 200:\n{p.Value}",null); + } + else + { + yield return new ValidationResult(ValidatorState.Success, $"The following host returned status code 200:\n{p.Value}", null); } } } From 5f0d8ee435ecb4ede40a8c4363a24d0dbe6593ed Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Mon, 1 Nov 2021 16:58:26 +0200 Subject: [PATCH 02/14] #613 Update validation messages in PathExistsValidator --- .../Validation/Validators/PathExistsValidator.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs index d4cf31d4..3fb0eaa2 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs @@ -5,7 +5,7 @@ namespace SIM.Sitecore9Installer.Validation.Validators { public class PathExistsValidator : BaseValidator { - public override string SuccessMessage => "Path exists on file system."; + public override string SuccessMessage => null; protected override IEnumerable GetErrorsForTask(Tasks.Task task, IEnumerable paramsToValidate) { @@ -13,7 +13,11 @@ protected override IEnumerable GetErrorsForTask(Tasks.Task tas { if (!this.PathExists(p.Value)) { - yield return new ValidationResult(ValidatorState.Error, $"Path {p.Value} does not exist.", null); + yield return new ValidationResult(ValidatorState.Error, $"The following path does not exist:\n{p.Value}", null); + } + else + { + yield return new ValidationResult(ValidatorState.Success, $"The following path exists:\n{p.Value}", null); } } } From d3fdbcd4d66370d651f17762b30ad668a34c105b Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Mon, 1 Nov 2021 17:04:44 +0200 Subject: [PATCH 03/14] #613 Update validation messages in CertificateValidator --- .../Validation/Validators/CertificateValidator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/CertificateValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/CertificateValidator.cs index 69282106..f04d5952 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/CertificateValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/CertificateValidator.cs @@ -6,7 +6,7 @@ namespace SIM.Sitecore9Installer.Validation.Validators { public class CertificateValidator : BaseValidator { - public override string SuccessMessage => $"Invalid certificates have not been found in {this.Data["StoreName"]}."; + public override string SuccessMessage => $"Invalid certificates have not been found in the '{this.Data["StoreName"]}' store."; protected override IEnumerable GetErrorsForTask(Task task, IEnumerable paramsToValidate) { @@ -26,7 +26,7 @@ protected override IEnumerable GetErrorsForTask(Task task, IEn bool isValid = this.ValidateCertificate(x509); if (!isValid) { - yield return new ValidationResult(ValidatorState.Error, string.Format("Certificate {0} - {1} is not valid", x509.SubjectName.Name, x509.Thumbprint), null); + yield return new ValidationResult(ValidatorState.Error, string.Format("Certificate '{0} - {1}' is not valid.", x509.SubjectName.Name, x509.Thumbprint), null); } x509.Reset(); } From 62c379b8aaf2c4140d7dc853b5b1ac9c93f1b879 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Mon, 1 Nov 2021 17:10:30 +0200 Subject: [PATCH 04/14] #613 Update validation messages in SolrVersionValidator --- .../Validators/SolrVersionValidator.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/SolrVersionValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/SolrVersionValidator.cs index c1494052..0695e604 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/SolrVersionValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/SolrVersionValidator.cs @@ -11,7 +11,8 @@ namespace SIM.Sitecore9Installer.Validation.Validators { public class SolrVersionValidator : IValidator { - public virtual string SuccessMessage => "Sitecore XP and 'Solr' versions are compatible."; + public virtual string SuccessMessage => "Sitecore and Solr versions are compatible."; + public string SolrUrl { get => this.Data["Solr"]; } public Dictionary Data { get; set; } @@ -50,8 +51,8 @@ public IEnumerable Evaluate(IEnumerable tasks) if (errors.oldSolrTaskNames.Any()) { yield return new ValidationResult(ValidatorState.Error, - $"'Solr' version is older than expected. Please consider a newer version. " + - $"Recommended 'Solr' versions: {Data["Versions"]}. " + + $"Solr version is older than expected. Please consider a newer version. " + + $"Recommended Solr versions: {Data["Versions"]}. " + $"Installation tasks related to the problematic Solr versions: {string.Join(", ", errors.oldSolrTaskNames)}", null); } @@ -59,18 +60,18 @@ public IEnumerable Evaluate(IEnumerable tasks) if (errors.unresolvedSolrTaskNames.Any()) { yield return new ValidationResult(ValidatorState.Error, - $"Unable to resolve 'Solr' versions for the following tasks: {string.Join(", ", errors.unresolvedSolrTaskNames)}", + $"Unable to resolve Solr versions for the following tasks: {string.Join(", ", errors.unresolvedSolrTaskNames)}", null); } if (errors.untestedSolrTaskNames.Any()) { yield return new ValidationResult(ValidatorState.Warning, - $"Sitecore XP and 'Solr' versions have not been tested together. They might be incompatible. " + - $"Recommended 'Solr' versions: {Data["Versions"]}. " + - $"Installation tasks related to the problematic Solr versions: {string.Join(", ", errors.untestedSolrTaskNames)}", + $"Sitecore and Solr versions have not been tested together. They might be incompatible. " + + $"Recommended Solr versions: {Data["Versions"]}. " + + $"Installation tasks related to the problematic Solr versions: {string.Join(", ", errors.untestedSolrTaskNames)}", null); - } + } } private SolrVersionValidatorErrors GetErrors(IEnumerable tasks, string[] compatibleVersions) From 71cb352fb02420b6bf666a10581a9078959a19f3 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:27:56 +0200 Subject: [PATCH 05/14] #613 Update validation messages in CmIdentityServerSiteNameValidator --- .../Validation/Validators/CmIdentityServerSiteNameValidator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/CmIdentityServerSiteNameValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/CmIdentityServerSiteNameValidator.cs index d02acef8..031ed52d 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/CmIdentityServerSiteNameValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/CmIdentityServerSiteNameValidator.cs @@ -12,7 +12,7 @@ public class CmIdentityServerSiteNameValidator : IValidator public Dictionary Data { get; set; } - public virtual string SuccessMessage => "'AllowedCorsOrigins' and 'PasswordRecoveryUrl' were set properly for 'IdentityServer' installation task."; + public virtual string SuccessMessage => "The 'AllowedCorsOrigins' and 'PasswordRecoveryUrl' parameters were set properly for the 'IdentityServer' installation task."; public CmIdentityServerSiteNameValidator() { From 5b5e13dad5c512c7e3d340192b038f1074d7ac91 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:30:25 +0200 Subject: [PATCH 06/14] #613 Update validation messages in CmDdsPatchSiteNameValidator --- .../Validation/Validators/CmDdsPatchSiteNameValidator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/CmDdsPatchSiteNameValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/CmDdsPatchSiteNameValidator.cs index 2781cb4d..a7cde68f 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/CmDdsPatchSiteNameValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/CmDdsPatchSiteNameValidator.cs @@ -12,7 +12,7 @@ public class CmDdsPatchSiteNameValidator : IValidator public Dictionary Data { get; set; } - public virtual string SuccessMessage => "'SiteName' value was set properly for 'sitecore-xp1-cm' and 'sitecore-XP1-cm-dds-patch' installation tasks."; + public virtual string SuccessMessage => "The 'SiteName' parameter's value was set properly for the 'sitecore-xp1-cm' and 'sitecore-XP1-cm-dds-patch' installation tasks."; public CmDdsPatchSiteNameValidator() { From 1367e4d766f6f4268b62359b192212da2aa64340 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:34:16 +0200 Subject: [PATCH 07/14] #613 Update validation messages in CorePrefixDoesNotExistValidator --- .../Validation/Validators/CorePrefixDoesNotExistValidator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/CorePrefixDoesNotExistValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/CorePrefixDoesNotExistValidator.cs index 7327ec8b..51001f93 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/CorePrefixDoesNotExistValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/CorePrefixDoesNotExistValidator.cs @@ -51,14 +51,14 @@ public IEnumerable Evaluate(IEnumerable tasks) if (errorGetcores != null) { - yield return new ValidationResult(ValidatorState.Error, $"Unable to get cores from solr {item.Item1}", errorGetcores); + yield return new ValidationResult(ValidatorState.Error, $"Unable to get cores from Solr '{item.Item1}'.", errorGetcores); continue; } if (coreNames.Any(cn => cn.StartsWith(item.Item2, StringComparison.InvariantCultureIgnoreCase))) { errors = true; - yield return new ValidationResult(ValidatorState.Error, $"Core with prefix {item.Item2} already exists in solr {item.Item1}",null); + yield return new ValidationResult(ValidatorState.Error, $"Core with the '{item.Item2}' prefix already exists in Solr '{item.Item1}'.", null); } } From 861d41cacbd20f133a362bc9aa0abace8031fc3e Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:36:43 +0200 Subject: [PATCH 08/14] #613 Update validation messages in DiskSpaceValidator and DiskSpaceValidatorTests --- .../Validation/Validators/DiskSpaceValidatorTests.cs | 9 ++------- .../Validation/Validators/DiskSpaceValidator.cs | 8 ++------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/DiskSpaceValidatorTests.cs b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/DiskSpaceValidatorTests.cs index 7ad06b7c..53228c0c 100644 --- a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/DiskSpaceValidatorTests.cs +++ b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/DiskSpaceValidatorTests.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using NSubstitute; using SIM.Sitecore9Installer.Validation; using SIM.Sitecore9Installer.Validation.Validators; @@ -17,7 +12,7 @@ public class DiskSpaceValidatorTests [Theory] [InlineData(@"C:\inetpub\wwwroot", 7368709120, ValidatorState.Success, "Hard disk has enough free space to continue the installation.")] [InlineData(@"C:\inetpub\wwwroot\", 5368709119, ValidatorState.Warning, @"Hard disk 'C:\' has a little free space.")] - [InlineData(@"D:\inetpub\", 3221225470, ValidatorState.Error, @"Hard disk 'D:\' does not have enough free space to continue installation.")] + [InlineData(@"D:\inetpub\", 3221225470, ValidatorState.Error, @"Hard disk 'D:\' does not have enough free space to continue the installation.")] [InlineData(@"D:\inetpub\wwwroot", -1, ValidatorState.Error, @"Hard disk 'D:\' has not been found.")] public void ReturnsValidValidationResults(string deployRoot, long freeSpace, ValidatorState expectedResult, string resultMessage) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/DiskSpaceValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/DiskSpaceValidator.cs index 9377ca56..76bddf71 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/DiskSpaceValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/DiskSpaceValidator.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SIM.Sitecore9Installer.Tasks; using Task = SIM.Sitecore9Installer.Tasks.Task; namespace SIM.Sitecore9Installer.Validation.Validators @@ -42,7 +38,7 @@ public IEnumerable Evaluate(IEnumerable tasks) if (freeSpace < hardDriveErrorLimit) { errors = true; - yield return new ValidationResult(ValidatorState.Error, $"Hard disk '{drive}' does not have enough free space to continue installation.", null); + yield return new ValidationResult(ValidatorState.Error, $"Hard disk '{drive}' does not have enough free space to continue the installation.", null); } else if (freeSpace < hardDriveWarningLimit) From 03e1e6819d150da0a00360faaed2f2100e6cc293 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:42:47 +0200 Subject: [PATCH 09/14] #613 Update validation messages in HostNameValidator --- .../Validation/Validators/HostNameValidator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/HostNameValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/HostNameValidator.cs index dc3e8203..a9788d4e 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/HostNameValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/HostNameValidator.cs @@ -6,7 +6,8 @@ namespace SIM.Sitecore9Installer.Validation.Validators { public class HostNameValidator : BaseValidator { - public override string SuccessMessage => "'Uri.CheckHostName()' validation has been finished successfully."; + public override string SuccessMessage => "Hosts defined in parameters of installations tasks are valid DNS names."; + protected override IEnumerable GetErrorsForTask(Task task, IEnumerable paramsToValidate) { foreach (InstallParam param in paramsToValidate) @@ -14,7 +15,7 @@ protected override IEnumerable GetErrorsForTask(Task task, IEn if (Uri.CheckHostName(param.Value) != UriHostNameType.Dns) { ValidationResult r = new ValidationResult(ValidatorState.Error, - string.Format("Invalid host in '{0}' of '{1}'", param.Name, task.Name), null); + string.Format("Invalid host is defined in the '{0}' parameter of the '{1}' installation task.", param.Name, task.Name), null); yield return r; } } From 2a2c1bbed4d1dee97b81837a319291390a2cba53 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:44:54 +0200 Subject: [PATCH 10/14] #613 Update validation messages in LicenseFileValidator --- .../Validation/Validators/LicenseFileValidatorTests.cs | 3 --- .../Validation/Validators/LicenseFileValidator.cs | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/LicenseFileValidatorTests.cs b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/LicenseFileValidatorTests.cs index 1619d99c..d2719b46 100644 --- a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/LicenseFileValidatorTests.cs +++ b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/LicenseFileValidatorTests.cs @@ -1,9 +1,6 @@ using NSubstitute; using SIM.Sitecore9Installer.Validation; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using SIM.Sitecore9Installer.Tasks; using SIM.Sitecore9Installer.Validation.Validators; using Xunit; diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/LicenseFileValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/LicenseFileValidator.cs index ac2d21c4..e70369e7 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/LicenseFileValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/LicenseFileValidator.cs @@ -1,5 +1,4 @@ -using SIM.Sitecore9Installer.Tasks; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; @@ -26,7 +25,7 @@ public IEnumerable Evaluate(IEnumerable tasks) { if (!FileExists(path)) { - yield return new ValidationResult(ValidatorState.Error, $"Unable to locate {path} license file.", null); + yield return new ValidationResult(ValidatorState.Error, $"Unable to locate the '{path}' license file.", null); hasErrors = true; } } From 453de4291363f40fd33b1416c7ca3968a67d6b1c Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:49:54 +0200 Subject: [PATCH 11/14] #613 Update validation messages in NugetToolPresenceValidator --- .../Validation/Validators/NugetToolPresenceValidator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/NugetToolPresenceValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/NugetToolPresenceValidator.cs index 9fb4575d..e6c6cc85 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/NugetToolPresenceValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/NugetToolPresenceValidator.cs @@ -32,7 +32,7 @@ private IEnumerable GetValidationResults() { ValidationResult result = new ValidationResult( state: ValidatorState.Error, - message: $"{TaskName}: nuget.exe is not a recognized as an internal or external command. To fix: download the NuGet.exe from https://www.nuget.org/downloads and set the local path of NuGet.exe into your path environment variable.", + message: $"{TaskName}: nuget.exe is not a recognized as an internal or external command. To fix: download 'nuget.exe' from https://www.nuget.org/downloads and set the local path of 'nuget.exe' into your path environment variable.", error: null); yield return result; @@ -41,7 +41,7 @@ private IEnumerable GetValidationResults() { ValidationResult result = new ValidationResult( state: ValidatorState.Error, - message: $"{TaskName}: The '{psError}' error occurred when 'nuget.exe' was invoked from PowerShell.", + message: $"{TaskName}: the '{psError}' error occurred when 'nuget.exe' was invoked from PowerShell.", error: null); yield return result; From 7f7113824ac89fe47a3cbecbfcf699e589715973 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:52:39 +0200 Subject: [PATCH 12/14] #613 Update validation messages in SolrServiceValidator --- .../Validation/Validators/SolrServiceValidatorTests.cs | 2 -- .../Validation/Validators/SolrServiceValidator.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SolrServiceValidatorTests.cs b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SolrServiceValidatorTests.cs index b973fae8..16f2b88d 100644 --- a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SolrServiceValidatorTests.cs +++ b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SolrServiceValidatorTests.cs @@ -1,9 +1,7 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.ServiceProcess; -using System.Text; using NSubstitute; using SIM.Sitecore9Installer.Tasks; using SIM.Sitecore9Installer.Validation; diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/SolrServiceValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/SolrServiceValidator.cs index efa00a4d..861524ee 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/SolrServiceValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/SolrServiceValidator.cs @@ -18,7 +18,7 @@ protected override IEnumerable GetErrorsForTask(Task task, if (service != null && service.Status != ServiceControllerStatus.Running) { yield return new ValidationResult(ValidatorState.Error, - $"Service '{param.Value}' required for '{task.Name}' is not running", null); + $"The '{param.Value}' service required for the '{task.Name}' installation task is not running.", null); } } } From 4b38e7cdb80cfe80be20440042e4cd9d69381452 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 11:56:04 +0200 Subject: [PATCH 13/14] #613 Update validation messages in SqlPefixValidator --- .../Validation/Validators/SqlPefixValidatorTests.cs | 2 -- .../Validation/Validators/SqlPefixValidator.cs | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SqlPefixValidatorTests.cs b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SqlPefixValidatorTests.cs index 3dbd87bd..f06f1b7f 100644 --- a/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SqlPefixValidatorTests.cs +++ b/src/SIM.Sitecore9Installer.Tests/Validation/Validators/SqlPefixValidatorTests.cs @@ -3,10 +3,8 @@ using SIM.Sitecore9Installer.Tasks; using SIM.Sitecore9Installer.Validation; using SIM.Sitecore9Installer.Validation.Validators; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Xunit; namespace SIM.Sitecore9Installer.Tests.Validation.Validators diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/SqlPefixValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/SqlPefixValidator.cs index 0cd7957b..39041375 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/SqlPefixValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/SqlPefixValidator.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; -using System.Text; - using SIM.Sitecore9Installer.Tasks; namespace SIM.Sitecore9Installer.Validation.Validators @@ -41,7 +39,7 @@ public IEnumerable Evaluate(IEnumerable tasks) { if (this.GetDbList(set.Item1, set.Item2, set.Item3, set.Item4).Any()) { - yield return new ValidationResult(ValidatorState.Error, $"Database with prefix {set.Item4} already exists on server {set.Item1}",null); + yield return new ValidationResult(ValidatorState.Error, $"Database with the '{set.Item4}' prefix already exists on the '{set.Item1}' server.", null); } } From d03b5dd190fa3bfb939698ef995b58d55dc09ee3 Mon Sep 17 00:00:00 2001 From: Dmitry Kolinchuk Date: Tue, 2 Nov 2021 12:10:36 +0200 Subject: [PATCH 14/14] #613 Update validation messages in HostAvaiableValidator and PathExistsValidator --- .../Validation/Validators/HostAvaiableValidator.cs | 6 +++--- .../Validation/Validators/PathExistsValidator.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs index 11aed53d..6327eba7 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/HostAvaiableValidator.cs @@ -24,17 +24,17 @@ protected override IEnumerable GetErrorsForTask(Tasks.Task tas if (error != null) { - yield return new ValidationResult(ValidatorState.Error, $"Unable to connect to the following host:\n{p.Value}", error); + yield return new ValidationResult(ValidatorState.Error, $"Unable to connect to the '{p.Value}' host defined in the '{p.Name}' parameter of the '{task.Name}' installation task.", error); yield break; } if (resp.StatusCode != HttpStatusCode.OK) { - yield return new ValidationResult(ValidatorState.Error, $"The following host did not return status code 200:\n{p.Value}",null); + yield return new ValidationResult(ValidatorState.Error, $"The '{p.Value}' host defined in the '{p.Name}' parameter of the '{task.Name}' installation task did not return status code 200.", null); } else { - yield return new ValidationResult(ValidatorState.Success, $"The following host returned status code 200:\n{p.Value}", null); + yield return new ValidationResult(ValidatorState.Success, $"The '{p.Value}' host defined in the '{p.Name}' parameter of the '{task.Name}' installation task returned status code 200.", null); } } } diff --git a/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs b/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs index 3fb0eaa2..48a09c17 100644 --- a/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs +++ b/src/SIM.Sitecore9Installer/Validation/Validators/PathExistsValidator.cs @@ -13,11 +13,11 @@ protected override IEnumerable GetErrorsForTask(Tasks.Task tas { if (!this.PathExists(p.Value)) { - yield return new ValidationResult(ValidatorState.Error, $"The following path does not exist:\n{p.Value}", null); + yield return new ValidationResult(ValidatorState.Error, $"The '{p.Value}' path defined in the '{p.Name}' parameter of the '{task.Name}' installation task does not exist.", null); } else { - yield return new ValidationResult(ValidatorState.Success, $"The following path exists:\n{p.Value}", null); + yield return new ValidationResult(ValidatorState.Success, $"The '{p.Value}' path defined in the '{p.Name}' parameter of the '{task.Name}' installation task exists.", null); } } }