)]}'
{"doc/source/developer-guidelines.rst":[{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"4d8261425d2bdb2ef170fd40cc3e2d9d6287a891","unresolved":false,"context_lines":[{"line_number":5,"context_line":"Testing"},{"line_number":6,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"During the Austin Summer Mid-Cycle, the Designate team spent some time"},{"line_number":9,"context_line":"discussing testing, and where we would like to move over the next few cycles."},{"line_number":10,"context_line":"The guidelines below reflect the outcomes of the discussion."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa1b9901_e8959432","line":8,"updated":"2015-08-20 19:58:59.000000000","message":"2015 Austin Summer Mid-Cycle*","commit_id":"aace4f3e74561e3a5e55152c5a271e81a529860b"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"72b0468e424f8fa1d80ee810cb9852a9f53b3232","unresolved":false,"context_lines":[{"line_number":5,"context_line":"Testing"},{"line_number":6,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"During the Austin Summer Mid-Cycle, the Designate team spent some time"},{"line_number":9,"context_line":"discussing testing, and where we would like to move over the next few cycles."},{"line_number":10,"context_line":"The guidelines below reflect the outcomes of the discussion."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa1b9901_e3885573","line":8,"in_reply_to":"fa1b9901_e8959432","updated":"2015-08-20 20:11:55.000000000","message":"Done","commit_id":"aace4f3e74561e3a5e55152c5a271e81a529860b"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"4d8261425d2bdb2ef170fd40cc3e2d9d6287a891","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Functional tests should cover all user facing functionality, within reason,"},{"line_number":18,"context_line":"including negative testing of bad inputs and expected failure response."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"One example of functinality which cannot be easily tested using TempesLib is"},{"line_number":21,"context_line":"areas of the codebase which require conflicting configuration to test, yet"},{"line_number":22,"context_line":"tempest expects to execute the tests concurrently. This, and similar, examples"},{"line_number":23,"context_line":"are acceptable to not be included in functional tests."}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa1b9901_a8847c0a","line":20,"updated":"2015-08-20 19:58:59.000000000","message":"*functionality, *TempestLib","commit_id":"aace4f3e74561e3a5e55152c5a271e81a529860b"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"72b0468e424f8fa1d80ee810cb9852a9f53b3232","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Functional tests should cover all user facing functionality, within reason,"},{"line_number":18,"context_line":"including negative testing of bad inputs and expected failure response."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"One example of functinality which cannot be easily tested using TempesLib is"},{"line_number":21,"context_line":"areas of the codebase which require conflicting configuration to test, yet"},{"line_number":22,"context_line":"tempest expects to execute the tests concurrently. This, and similar, examples"},{"line_number":23,"context_line":"are acceptable to not be included in functional tests."}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa1b9901_63952585","line":20,"in_reply_to":"fa1b9901_a8847c0a","updated":"2015-08-20 20:11:55.000000000","message":"Done","commit_id":"aace4f3e74561e3a5e55152c5a271e81a529860b"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"2d2b64935e157b660707944f8d882a2e8e73224d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Functional Testing"},{"line_number":13,"context_line":"------------------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Functional testing is performed with tempest-lib, and the tests live in the"},{"line_number":16,"context_line":"`functionaltests/` folder within the root of the Designate repository."},{"line_number":17,"context_line":"Functional tests should cover all user facing functionality, where possible,"},{"line_number":18,"context_line":"including negative testing of bad inputs and expected failure response."}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_a800fc66","line":15,"updated":"2015-08-20 19:59:28.000000000","message":"Maybe add a (sometimes called integration tests) just to clarify.","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"33182f003fb0dcc760d9b81299c9ffd940409e1c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Functional Testing"},{"line_number":13,"context_line":"------------------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Functional testing is performed with tempest-lib, and the tests live in the"},{"line_number":16,"context_line":"`functionaltests/` folder within the root of the Designate repository."},{"line_number":17,"context_line":"Functional tests should cover all user facing functionality, where possible,"},{"line_number":18,"context_line":"including negative testing of bad inputs and expected failure response."}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_084ec8c0","line":15,"in_reply_to":"fa1b9901_a800fc66","updated":"2015-08-20 20:11:50.000000000","message":"Done","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"2d2b64935e157b660707944f8d882a2e8e73224d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Functional testing is performed with tempest-lib, and the tests live in the"},{"line_number":16,"context_line":"`functionaltests/` folder within the root of the Designate repository."},{"line_number":17,"context_line":"Functional tests should cover all user facing functionality, where possible,"},{"line_number":18,"context_line":"including negative testing of bad inputs and expected failure response."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"One example of functinality which cannot be easily tested using TempesLib is"},{"line_number":21,"context_line":"areas of the codebase which require conflicting configuration to test, yet"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_48fcc06f","line":18,"updated":"2015-08-20 19:59:28.000000000","message":"How making negative testing a link to the wikipedia page: https://en.wikipedia.org/wiki/Negative_test\n\nIt is not a very informative page, but it covers the bases.","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"33182f003fb0dcc760d9b81299c9ffd940409e1c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Functional testing is performed with tempest-lib, and the tests live in the"},{"line_number":16,"context_line":"`functionaltests/` folder within the root of the Designate repository."},{"line_number":17,"context_line":"Functional tests should cover all user facing functionality, where possible,"},{"line_number":18,"context_line":"including negative testing of bad inputs and expected failure response."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"One example of functinality which cannot be easily tested using TempesLib is"},{"line_number":21,"context_line":"areas of the codebase which require conflicting configuration to test, yet"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_28494cb7","line":18,"in_reply_to":"fa1b9901_48fcc06f","updated":"2015-08-20 20:11:50.000000000","message":"Done","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"2d2b64935e157b660707944f8d882a2e8e73224d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"------------"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Unit testing is performed using the standard suite of tools common to all"},{"line_number":29,"context_line":"OpenStack projects (oslotest, testr, fixtures, subunit etc), and live within"},{"line_number":30,"context_line":"the designate/tests/unit folder of the Designate repository."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Unit tests should mock all calls leaving the current component, but not calls"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_e831145b","line":29,"updated":"2015-08-20 19:59:28.000000000","message":"Link to the standard testing tools https://wiki.openstack.org/wiki/Testing ?","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"33182f003fb0dcc760d9b81299c9ffd940409e1c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"------------"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Unit testing is performed using the standard suite of tools common to all"},{"line_number":29,"context_line":"OpenStack projects (oslotest, testr, fixtures, subunit etc), and live within"},{"line_number":30,"context_line":"the designate/tests/unit folder of the Designate repository."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Unit tests should mock all calls leaving the current component, but not calls"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_a3a7bd09","line":29,"in_reply_to":"fa1b9901_e831145b","updated":"2015-08-20 20:11:50.000000000","message":"Done","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"2d2b64935e157b660707944f8d882a2e8e73224d","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Unit tests should mock all calls leaving the current component, but not calls"},{"line_number":33,"context_line":"within the current component. This is to provide a balance between a concise"},{"line_number":34,"context_line":"test codebase, failure traceability, and test brittleness and effectiveness."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"For example, if testing Designate Central\u0027s"},{"line_number":37,"context_line":"\"_is_valid_recordset_placement_subdomain\" method, a modified version is"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_484360b2","line":34,"updated":"2015-08-20 19:59:28.000000000","message":"I think the lower bound of mocking at the component level is good, but I requiring tests use actual functions in the component can be problematic, especially when \"component\" is not a clear python concept like module, package, class, etc.","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"33182f003fb0dcc760d9b81299c9ffd940409e1c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Unit tests should mock all calls leaving the current component, but not calls"},{"line_number":33,"context_line":"within the current component. This is to provide a balance between a concise"},{"line_number":34,"context_line":"test codebase, failure traceability, and test brittleness and effectiveness."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"For example, if testing Designate Central\u0027s"},{"line_number":37,"context_line":"\"_is_valid_recordset_placement_subdomain\" method, a modified version is"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_43b34150","line":34,"in_reply_to":"fa1b9901_484360b2","updated":"2015-08-20 20:11:50.000000000","message":"Done","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"2d2b64935e157b660707944f8d882a2e8e73224d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                raise exceptions.InvalidRecordSetLocation(msg)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"In this example, we would mock the storage `find_domains()` method, but not the"},{"line_number":58,"context_line":"central `_is_valid_recordset_name()` method."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Example DNS Names and IP Space"},{"line_number":61,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_c815309c","line":58,"updated":"2015-08-20 19:59:28.000000000","message":"I\u0027d feel better suggesting mocking both. If 10 methods call a sub method and we require that it must be called (not to mention any subcalls) we are going to end up with pretty serious stubs to ensure that the cascade of calls has proper values.\n\nMaybe changing the wording to SHOULD mock find_domains and MAY mock _is_valid_recordsset_name.","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"33182f003fb0dcc760d9b81299c9ffd940409e1c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                raise exceptions.InvalidRecordSetLocation(msg)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"In this example, we would mock the storage `find_domains()` method, but not the"},{"line_number":58,"context_line":"central `_is_valid_recordset_name()` method."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Example DNS Names and IP Space"},{"line_number":61,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa1b9901_6340c534","line":58,"in_reply_to":"fa1b9901_c815309c","updated":"2015-08-20 20:11:50.000000000","message":"Used a simpler example method!","commit_id":"b49e9db0522e941a3d63428cd0b82a383970cd8f"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"fd785923d3d7f9de44c2f06e5cd3f692e2d89ba7","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Functional Testing"},{"line_number":13,"context_line":"------------------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Functional testing, sometimes called integration testing, is performed with"},{"line_number":16,"context_line":"tempest-lib, and the tests live in the `functionaltests/` folder within the"},{"line_number":17,"context_line":"root of the Designate repository. Functional tests should cover all user facing"},{"line_number":18,"context_line":"functionality, where possible, including `negative testing`_. of bad inputs and"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_03aa2919","line":15,"updated":"2015-08-20 20:25:33.000000000","message":"\"performed using\"","commit_id":"d64a858a3f1a37c62e87d24814bee67d1a2e8dc5"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"730a943bada5ea841260f41a1c499994d8775c0d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Functional Testing"},{"line_number":13,"context_line":"------------------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Functional testing, sometimes called integration testing, is performed with"},{"line_number":16,"context_line":"tempest-lib, and the tests live in the `functionaltests/` folder within the"},{"line_number":17,"context_line":"root of the Designate repository. Functional tests should cover all user facing"},{"line_number":18,"context_line":"functionality, where possible, including `negative testing`_. of bad inputs and"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_e337f5fc","line":15,"in_reply_to":"fa1b9901_03aa2919","updated":"2015-08-20 20:28:00.000000000","message":"Done","commit_id":"d64a858a3f1a37c62e87d24814bee67d1a2e8dc5"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"fd785923d3d7f9de44c2f06e5cd3f692e2d89ba7","unresolved":false,"context_lines":[{"line_number":21,"context_line":"One example of functionality which cannot be easily tested using tempest-lib is"},{"line_number":22,"context_line":"areas of the codebase which require conflicting configuration to test, yet"},{"line_number":23,"context_line":"tempest expects to execute the tests concurrently. This, and similar, examples"},{"line_number":24,"context_line":"are acceptable to not be included in functional tests."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Unit Testing"},{"line_number":27,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_63af652a","line":24,"updated":"2015-08-20 20:25:33.000000000","message":"There will be tests that are incompatible with the tempest style of testing.\nIf an area of the code base can not be tested in tempest,  best efforts should be made to test it, using other applicable tools.","commit_id":"d64a858a3f1a37c62e87d24814bee67d1a2e8dc5"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"730a943bada5ea841260f41a1c499994d8775c0d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"One example of functionality which cannot be easily tested using tempest-lib is"},{"line_number":22,"context_line":"areas of the codebase which require conflicting configuration to test, yet"},{"line_number":23,"context_line":"tempest expects to execute the tests concurrently. This, and similar, examples"},{"line_number":24,"context_line":"are acceptable to not be included in functional tests."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Unit Testing"},{"line_number":27,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa1b9901_c33431fd","line":24,"in_reply_to":"fa1b9901_63af652a","updated":"2015-08-20 20:28:00.000000000","message":"Done","commit_id":"d64a858a3f1a37c62e87d24814bee67d1a2e8dc5"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"cd8aa4293a829a0a243026e60f487a8be4024e38","unresolved":false,"context_lines":[{"line_number":45,"context_line":"This is not a hard and fast rule, there are cases where it may be advantageous"},{"line_number":46,"context_line":"to mock calls within the component, and cases where it may be best to not mock"},{"line_number":47,"context_line":"calls outside the component - such as calls to the stdlib, or well tested"},{"line_number":48,"context_line":"external libraries (e.g. the oslo.* suite of libs)."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"For example, if testing Designate Central\u0027s \"_update_domain_in_storage\" method,"},{"line_number":51,"context_line":"a modified version is included below for reference:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"fa1b9901_d49fbb4e","line":48,"updated":"2015-08-22 18:04:46.000000000","message":"Add note on DesignateObjects","commit_id":"009dd0111ee717afc260857676523d23f9bd3afa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"cd8aa4293a829a0a243026e60f487a8be4024e38","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if increment_serial:"},{"line_number":62,"context_line":"            # _increment_domain_serial increments and updates the domain"},{"line_number":63,"context_line":"            domain \u003d self._increment_domain_serial(context, domain)"},{"line_number":64,"context_line":"        else:"},{"line_number":65,"context_line":"            domain \u003d self.storage.update_domain(context, domain)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"fa1b9901_149d3359","line":63,"updated":"2015-08-22 18:04:46.000000000","message":"This is actually still a terrible example, as it\u0027s calling into a method that makes several storage calls for a trivial task, i.e. it would be much simpler to mock this method than all the storage methods it calls ;)","commit_id":"009dd0111ee717afc260857676523d23f9bd3afa"}]}
