diff --git a/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityMessageWriterTest.cs b/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityMessageWriterTest.cs index e7f566a..a303beb 100644 --- a/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityMessageWriterTest.cs +++ b/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityMessageWriterTest.cs @@ -31,25 +31,25 @@ protected override ITeamCityMessageWriter Create(IServiceMessageProcessor proc) [Test] public void TestErrorMessage() { - DoTest(x => x.WriteError("Opps"), "##teamcity[message text='Opps' status='ERROR']"); + DoTest(x => x.WriteError("Opps"), "##teamcity[message text='Opps' status='ERROR' tc:tags='tc:parseServiceMessagesInside']"); } [Test] public void TestErrorMessage2() { - DoTest(x => x.WriteError("Opps", "Es gefaehlt mir gut"), "##teamcity[message text='Opps' status='ERROR' errorDetails='Es gefaehlt mir gut']"); + DoTest(x => x.WriteError("Opps", "Es gefaehlt mir gut"), "##teamcity[message text='Opps' status='ERROR' tc:tags='tc:parseServiceMessagesInside' errorDetails='Es gefaehlt mir gut']"); } [Test] public void TestNormalMessage() { - DoTest(x => x.WriteMessage("Hello TeamCity World"), "##teamcity[message text='Hello TeamCity World' status='NORMAL']"); + DoTest(x => x.WriteMessage("Hello TeamCity World"), "##teamcity[message text='Hello TeamCity World' status='NORMAL' tc:tags='tc:parseServiceMessagesInside']"); } [Test] public void TestWarningMessage() { - DoTest(x => x.WriteWarning("Opps"), "##teamcity[message text='Opps' status='WARNING']"); + DoTest(x => x.WriteWarning("Opps"), "##teamcity[message text='Opps' status='WARNING' tc:tags='tc:parseServiceMessagesInside']"); } } } \ No newline at end of file diff --git a/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityWriterFlowsTest.cs b/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityWriterFlowsTest.cs index ad00887..59c1f81 100644 --- a/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityWriterFlowsTest.cs +++ b/TeamCity.ServiceMessages.Tests/Write/Specials/TeamCityWriterFlowsTest.cs @@ -170,8 +170,8 @@ public void TestFlows_FromBlock() }, "##teamcity[blockOpened name='xB' flowId='1']", "##teamcity[flowStarted parent='1' flowId='2']", - "##teamcity[message text='flow' status='NORMAL' flowId='2']", - "##teamcity[message text='base' status='NORMAL' flowId='1']", + "##teamcity[message text='flow' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='2']", + "##teamcity[message text='base' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='1']", "##teamcity[flowFinished flowId='2']", "##teamcity[blockClosed name='xB' flowId='1']" ); @@ -194,9 +194,9 @@ public void TestFlows_OneFlow() } }, "##teamcity[flowStarted parent='1' flowId='2']", - "##teamcity[message text='flow1 message' status='NORMAL' flowId='2']", - "##teamcity[message text='flowB message' status='NORMAL' flowId='1']", - "##teamcity[message text='flow1 message' status='NORMAL' flowId='2']", + "##teamcity[message text='flow1 message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='2']", + "##teamcity[message text='flowB message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='1']", + "##teamcity[message text='flow1 message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='2']", "##teamcity[flowFinished flowId='2']" ); } @@ -307,9 +307,9 @@ public void TestFlows_TwoBlocks() "##teamcity[blockOpened name='b1' flowId='2']", "##teamcity[blockOpened name='b2' flowId='3']", "##teamcity[blockOpened name='root' flowId='1']", - "##teamcity[message text='root' status='NORMAL' flowId='1']", - "##teamcity[message text='flow1 message' status='NORMAL' flowId='2']", - "##teamcity[message text='flow2 message' status='NORMAL' flowId='3']", + "##teamcity[message text='root' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='1']", + "##teamcity[message text='flow1 message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='2']", + "##teamcity[message text='flow2 message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='3']", "##teamcity[blockClosed name='b1' flowId='2']", "##teamcity[blockClosed name='root' flowId='1']", "##teamcity[blockClosed name='b2' flowId='3']", @@ -338,9 +338,9 @@ public void TestFlows_TwoFlow() }, "##teamcity[flowStarted parent='1' flowId='2']", "##teamcity[flowStarted parent='1' flowId='3']", - "##teamcity[message text='flow1 message' status='NORMAL' flowId='2']", - "##teamcity[message text='flowB message' status='NORMAL' flowId='1']", - "##teamcity[message text='flow2 message' status='NORMAL' flowId='3']", + "##teamcity[message text='flow1 message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='2']", + "##teamcity[message text='flowB message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='1']", + "##teamcity[message text='flow2 message' status='NORMAL' tc:tags='tc:parseServiceMessagesInside' flowId='3']", "##teamcity[flowFinished flowId='3']", "##teamcity[flowFinished flowId='2']" ); diff --git a/TeamCity.ServiceMessages/Write/Special/Impl/Writer/TeamCityMessageWriter.cs b/TeamCity.ServiceMessages/Write/Special/Impl/Writer/TeamCityMessageWriter.cs index 37a2c89..3342a16 100644 --- a/TeamCity.ServiceMessages/Write/Special/Impl/Writer/TeamCityMessageWriter.cs +++ b/TeamCity.ServiceMessages/Write/Special/Impl/Writer/TeamCityMessageWriter.cs @@ -49,7 +49,7 @@ private void Write([NotNull] string text, string details, [NotNull] string statu { if (text == null) throw new ArgumentNullException(nameof(text)); if (status == null) throw new ArgumentNullException(nameof(status)); - var msg = new ServiceMessage("message") {{"text", text}, {"status", status}}; + var msg = new ServiceMessage("message") {{"text", text}, {"status", status}, {"tc:tags", "tc:parseServiceMessagesInside"}}; if (!string.IsNullOrEmpty(details)) { msg.Add("errorDetails", details);