Fix unit test checking Gerrit plugin version

Review Request #9860 — Created April 6, 2018 and submitted

Barret Rennie
Review Board
release-3.0.x
57022c8...
reviewboard

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.

  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
David Trowbridge
  1. 
      
  2. 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:
        ...
    
  3. 
      
Barret Rennie
David Trowbridge
  1. 
      
  2. This is from another change. Please post with the correct revision range (and please look at your diffs before publishing)

  3. 
      
Barret Rennie
David Trowbridge
  1. Ship It!
  2. 
      
Christian Hammond
  1. 
      
  2. 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 after REQUIRED_PLUGIN_VERSION, so that we use the same exact value in both places instead of recomputing both.

  3. 
      
Barret Rennie
Christian Hammond
  1. Ship It!
  2. 
      
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (fcba7b6)
Loading...