• 
      

    Fix unit test checking Gerrit plugin version

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

    Information

    Review Board
    release-3.0.x
    57022c8...

    Reviewers

    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: ...

    daviddavid

    This is from another change. Please post with the correct revision range (and please look at your diffs before publishing)

    daviddavid

    Should be %d to explicitly match how the format string is being built. Thinking though that we should have a …

    chipx86chipx86
    david
    1. 
        
    2. reviewboard/hostingsvcs/gerrit.py (Diff revision 1)
       
       
       
       
       
       
      Show all issues

      This is confusing. Why not:

      version_str = rsp['gerrit-reviewboard']['version']
      
      try:
          version = self._parse_plugin_version(version_str)
      except Exception as e:
          ...
      
      1. That was an accident.

    3. 
        
    brennie
    david
    1. 
        
    2. Show all issues

      This is from another change. Please post with the correct revision range (and please look at your diffs before publishing)

    3. 
        
    brennie
    david
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      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. 
        
    brennie
    chipx86
    1. Ship It!
    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (fcba7b6)