Files
gerrit/gerrit-acceptance-framework
David Pursehouse 239de04264 PushOneCommit#assertStatus: Make assertion of error message less strict
In tests where the ExpectedException pattern is used, i.e.

  exception.expect(SomeException.class);
  exception.expectMessage("some message");

it does not do an exact match on the expected message, but allows
the test to pass if the expected message is contained in the actual
message. The match is not case-sensitive.

However, in PushOneCommit's assertStatus method, the test fails if
the message is not an exact match. This causes failures for example
when a suffix is added to messages.

Allow the match to be less strict, like ExpectedException.expectMessage,
by checking for "contains" rather than "equals". It is still not as
lenient as ExpectedException.expectMessage because "contains" is case
sensitive, but this will nevertheless reduce false positive failures
caused by minor message adjustments.

Change-Id: I257a67903e49f060f61de1824f7d28aa37df2465
2017-11-08 19:41:49 +09:00
..
2017-11-02 08:54:01 -04:00