Skip to content

Commit

Permalink
test: Update CSP tests to look for "Conflict" instead of "Gone" in co…
Browse files Browse the repository at this point in the history
…nnect response body
  • Loading branch information
tippmar-nr committed Dec 14, 2023
1 parent faf09b2 commit 61b2997
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public AspNetCoreLocalHSMDisabledAndServerSideHSMEnabledTests(RemoteServiceFixtu
public void Test()
{
// This test looks for the connect response body that was intended to be removed in P17, but was not. If it does get removed this will fail.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Gone with message {\"exception\":{\"message\":\"Account Security Violation: *?");
// 12/14/23 - the response status changed from "Gone" to "Conflict". If this test fails in the future, be alert for it possibly changing back.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Conflict with message {\"exception\":{\"message\":\"Account Security Violation: *?");
Assert.NotNull(notConnectedLogLine);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public AspNetCoreLocalHSMEnabledAndServerSideHSMDisabledTests(RemoteServiceFixtu
public void Test()
{
// This test looks for the connect response body that was intended to be removed in P17, but was not. If it does get removed this will fail.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Gone with message {\"exception\":{\"message\":\"Account Security Violation: *?");
// 12/14/23 - the response status changed from "Gone" to "Conflict". If this test fails in the future, be alert for it possibly changing back.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Conflict with message {\"exception\":{\"message\":\"Account Security Violation: *?");
Assert.NotNull(notConnectedLogLine);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public HighSecurityModeServerDisabled(RemoteServiceFixtures.OwinWebApiFixture fi
public void Test()
{
// This test looks for the connect response body that was intended to be removed in P17, but was not. If it does get removed this will fail.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Gone with message {\"exception\":{\"message\":\"Account Security Violation: *?");
// 12/14/23 - the response status changed from "Gone" to "Conflict". If this test fails in the future, be alert for it possibly changing back.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Conflict with message {\"exception\":{\"message\":\"Account Security Violation: *?");
Assert.NotNull(notConnectedLogLine);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public HighSecurityModeServerEnabled(RemoteServiceFixtures.HSMOwinWebApiFixture
public void Test()
{
// This test looks for the connect response body that was intended to be removed in P17, but was not. If it does get removed this will fail.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Gone with message {\"exception\":{\"message\":\"Account Security Violation: *?");
// 12/14/23 - the response status changed from "Gone" to "Conflict". If this test fails in the future, be alert for it possibly changing back.
var notConnectedLogLine = _fixture.AgentLog.TryGetLogLine(AgentLogBase.ErrorResponseLogLinePrefixRegex + "Received HTTP status code Conflict with message {\"exception\":{\"message\":\"Account Security Violation: *?");
Assert.NotNull(notConnectedLogLine);
}
}
Expand Down

0 comments on commit 61b2997

Please sign in to comment.