← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1140384] Re: Improve test_api_samples.py to generate useful response template files

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => grizzly-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1140384

Title:
  Improve test_api_samples.py to generate useful response template files

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Currently, test_api_samples.py, when used w/ the GENERATE_SAMPLES=True
  flag, generates a zero-length file for those response template files
  that don't exist. In my opinion this needs to be improved as it then
  requires a manual copy of the template file to the sample file by the
  developer writing the samples.

  I am proposing to have the test framework, only in cases of responses,
  copy the sample file to its corresponding template location if and
  only if the template file does not already exist.

  By doing this, the developer:
  - does not have to make the manual copy, and, only if necessary, modify the template file to add regexs.
  - is less prone to end up with a template body which looks different (in the order things are listed) than the response body.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1140384/+subscriptions