Fix unit test checking Gerrit plugin version
Review Request #9860 — Created April 6, 2018 and submitted
The unit test that was checking for a failed plugin compatability
used hardcoded version string of 0.1.0, instead of the actual required
version. This didn't get caught during the plugin version bump that
happened when we released the gerrit plugin but has now been rectified.The error message has also been improved to include the original version
string we receive instead of our parsed tuple.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
This is confusing. Why not: version_str = rsp['gerrit-reviewboard']['version'] try: version = self._parse_plugin_version(version_str) except Exception as e: ... |
david | |
This is from another change. Please post with the correct revision range (and please look at your diffs before publishing) |
david | |
Should be %d to explicitly match how the format string is being built. Thinking though that we should have a … |
chipx86 |
-
-
reviewboard/hostingsvcs/gerrit.py (Diff revision 1) This is confusing. Why not:
version_str = rsp['gerrit-reviewboard']['version'] try: version = self._parse_plugin_version(version_str) except Exception as e: ...
Change Summary:
Addressed David's feedback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+11 -6) |
Checks run (2 succeeded)
-
-
reviewboard/notifications/email/message.py (Diff revision 2) This is from another change. Please post with the correct revision range (and please look at your diffs before publishing)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+5 -4) |
Checks run (2 succeeded)
-
-
reviewboard/hostingsvcs/tests/test_gerrit.py (Diff revision 3) Should be
%d
to explicitly match how the format string is being built.Thinking though that we should have a
REQUIRED_PLUGIN_VERSION_STR
constant that builds the%d.%d.%d
right afterREQUIRED_PLUGIN_VERSION
, so that we use the same exact value in both places instead of recomputing both.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+8 -6) |