Skip to content

Commit

Permalink
Merge pull request #642 from ballerina-platform/http-error-msg-change
Browse files Browse the repository at this point in the history
Fix error message assertion
  • Loading branch information
TharmiganK authored Feb 1, 2024
2 parents fa72756 + 09c9bdc commit cbcd929
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ballerina/tests/subscription_initiation_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,9 @@ function testSubInitFailedWithListenerForSubFailure() returns error? {
var startDetails = ls.'start();
test:assertTrue(startDetails is error);
if startDetails is error {
string expectedStart = "Subscription initiation failed due to: Error in request: Mode[subscribe] at Hub[http://127.0.0.1:9192/common/failed] - ";
string expectedEnd = "\"status\":404, \"reason\":\"Not Found\", \"message\":\"no matching resource found for" +
" path\", \"path\":\"/common/failed\", \"method\":\"POST\"}";
test:assertTrue(startDetails.message().startsWith(expectedStart));
test:assertTrue(startDetails.message().endsWith(expectedEnd));
string expected = "Subscription initiation failed due to: Error in request: Mode[subscribe] at Hub[http://127.0.0.1:9192/common/failed] - ";
test:assertTrue(startDetails.message().startsWith(expected));
test:assertTrue(startDetails.message().includes("no matching resource found for path"));
}
check ls.gracefulStop();
}

0 comments on commit cbcd929

Please sign in to comment.