diff --git a/source/Calamari.Tests/KubernetesFixtures/ManifestDataMaskerTests.cs b/source/Calamari.Tests/KubernetesFixtures/ManifestDataMaskerTests.cs index ec15ff4cf..6f9c5eb80 100644 --- a/source/Calamari.Tests/KubernetesFixtures/ManifestDataMaskerTests.cs +++ b/source/Calamari.Tests/KubernetesFixtures/ManifestDataMaskerTests.cs @@ -2,6 +2,7 @@ using System.IO; using System.Linq; using Calamari.Kubernetes; +using Calamari.Tests.Helpers; using FluentAssertions; using NUnit.Framework; using YamlDotNet.RepresentationModel; @@ -25,6 +26,8 @@ public void MaskSensitiveData_ShouldMaskExpectedTasks(string sourceYaml, string node = (YamlMappingNode)doc.RootNode; } + expectedYaml = expectedYaml.ReplaceLineEndings(); + //Act ManifestDataMasker.MaskSensitiveData(node); @@ -36,7 +39,8 @@ public void MaskSensitiveData_ShouldMaskExpectedTasks(string sourceYaml, string var outputYaml = writer.ToString() //The yaml stream adds a document separator (...) to the end of the yaml (even for a single document), so strip it as we don't care for the test assertion - .TrimEnd('\r', '\n', '.'); + .TrimEnd('\r', '\n', '.') + .ReplaceLineEndings(); outputYaml.Should().Be(expectedYaml); }