)]}'
{"heat/engine/api.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4b6d856feee6f66c2472ea84fbc98cf69372d872","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return res"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def format_stack_preview(stack):"},{"line_number":126,"context_line":"    def format_resource(res):"},{"line_number":127,"context_line":"        if isinstance(res, list):"},{"line_number":128,"context_line":"            return map(format_resource, res)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Boiw%3D","line":125,"updated":"2014-01-23 18:06:15.000000000","message":"I think this should be pulled into the api patch. See comments in service.py as well.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"58cef1dbaae75f83af190203f9f9cb87ff016d95","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return res"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def format_stack_preview(stack):"},{"line_number":126,"context_line":"    def format_resource(res):"},{"line_number":127,"context_line":"        if isinstance(res, list):"},{"line_number":128,"context_line":"            return map(format_resource, res)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BjIs%3D","line":125,"in_reply_to":"AAAAUH%2F%2BllY%3D","updated":"2014-01-24 14:52:27.000000000","message":"Actually, this is by design. See my comment in ``service.py``.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"2123737e3ed7185474d73d7b4d8732cabed6ab80","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return res"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def format_stack_preview(stack):"},{"line_number":126,"context_line":"    def format_resource(res):"},{"line_number":127,"context_line":"        if isinstance(res, list):"},{"line_number":128,"context_line":"            return map(format_resource, res)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BllY%3D","line":125,"in_reply_to":"AAAAUH%2F%2Boiw%3D","updated":"2014-01-24 04:10:45.000000000","message":"Done","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"}],"heat/engine/service.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4b6d856feee6f66c2472ea84fbc98cf69372d872","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        :param args: Request parameters/args passed from API"},{"line_number":343,"context_line":"        \"\"\""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        logger.info(_(\u0027template is %s\u0027) % template)"},{"line_number":346,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":347,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bohs%3D","line":345,"updated":"2014-01-23 18:06:15.000000000","message":"either remove or use logger.debug","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"2123737e3ed7185474d73d7b4d8732cabed6ab80","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        :param args: Request parameters/args passed from API"},{"line_number":343,"context_line":"        \"\"\""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        logger.info(_(\u0027template is %s\u0027) % template)"},{"line_number":346,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":347,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BlnM%3D","line":345,"in_reply_to":"AAAAUH%2F%2Bohs%3D","updated":"2014-01-24 04:10:45.000000000","message":"I used the same pattern in ``create_stack`` (see line 373)","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4b6d856feee6f66c2472ea84fbc98cf69372d872","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        self._validate_deferred_auth_context(cnxt, stack)"},{"line_number":354,"context_line":"        stack.validate()"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        return api.format_stack_preview(stack)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @request_context"},{"line_number":359,"context_line":"    def create_stack(self, cnxt, stack_name, template, params, files, args):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BohA%3D","line":356,"updated":"2014-01-23 18:06:15.000000000","message":"IMO, this should just return the data and let the api do the formatting on the response (in the API patch). Its a cleaner separation","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"58cef1dbaae75f83af190203f9f9cb87ff016d95","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        self._validate_deferred_auth_context(cnxt, stack)"},{"line_number":354,"context_line":"        stack.validate()"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        return api.format_stack_preview(stack)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @request_context"},{"line_number":359,"context_line":"    def create_stack(self, cnxt, stack_name, template, params, files, args):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BjJM%3D","line":356,"in_reply_to":"AAAAUH%2F%2BjRI%3D","updated":"2014-01-24 14:52:27.000000000","message":"And this is why you don\u0027t look at comments late at night: it turns out this is ENGINE.API, not heat.api.\n\nIf you try to return a stack to the API, you get circular reference problems, so all methods that return a stack or a group of stacks actually format them right before returning.  The file ``engine/api.py`` doesn\u0027t have any comments, but given the methods it contains, I believe that\u0027s its sole purpose.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"cd2f5c8384d22f76396ef31eb8686472e2a5e794","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        self._validate_deferred_auth_context(cnxt, stack)"},{"line_number":354,"context_line":"        stack.validate()"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        return api.format_stack_preview(stack)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @request_context"},{"line_number":359,"context_line":"    def create_stack(self, cnxt, stack_name, template, params, files, args):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BjRI%3D","line":356,"in_reply_to":"AAAAUH%2F%2Bllc%3D","updated":"2014-01-24 13:49:10.000000000","message":"On another note, I knew I had followed the example of somewhere else! See ``show_stack`` line 251! ;)\n\nI remember having trouble passing the resulting stack back to the API without formatting it first, but I\u0027ll take another look at it.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"2123737e3ed7185474d73d7b4d8732cabed6ab80","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        self._validate_deferred_auth_context(cnxt, stack)"},{"line_number":354,"context_line":"        stack.validate()"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        return api.format_stack_preview(stack)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @request_context"},{"line_number":359,"context_line":"    def create_stack(self, cnxt, stack_name, template, params, files, args):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bllc%3D","line":356,"in_reply_to":"AAAAUH%2F%2BohA%3D","updated":"2014-01-24 04:10:45.000000000","message":"Agreed. I\u0027ll submit the change in the next patch.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9591,"name":"Ton Ngo","email":"ton@us.ibm.com","username":"tango"},"change_message_id":"3f14f6a3479bdc7b63e0d3834b6a795f2e94f2ea","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        if db_api.stack_get_by_name(cnxt, stack_name):"},{"line_number":343,"context_line":"            raise exception.StackExists(stack_name\u003dstack_name)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        tenant_limit \u003d cfg.CONF.max_stacks_per_tenant"},{"line_number":346,"context_line":"        if db_api.stack_count_all_by_tenant(cnxt) \u003e\u003d tenant_limit:"},{"line_number":347,"context_line":"            message \u003d _(\"You have reached the maximum stacks per tenant, %d.\""},{"line_number":348,"context_line":"                        \" Please delete some stacks.\") % tenant_limit"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BMlQ%3D","line":345,"updated":"2014-01-29 06:33:53.000000000","message":"For the purpose of pre-viewing, maybe the limit should not be enforced.  Then this code segment can\u0027t be factored out from create_stack() below.","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"021faac9691597dd03a1968028215cb1e75b0d67","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        if db_api.stack_get_by_name(cnxt, stack_name):"},{"line_number":343,"context_line":"            raise exception.StackExists(stack_name\u003dstack_name)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        tenant_limit \u003d cfg.CONF.max_stacks_per_tenant"},{"line_number":346,"context_line":"        if db_api.stack_count_all_by_tenant(cnxt) \u003e\u003d tenant_limit:"},{"line_number":347,"context_line":"            message \u003d _(\"You have reached the maximum stacks per tenant, %d.\""},{"line_number":348,"context_line":"                        \" Please delete some stacks.\") % tenant_limit"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9yV8%3D","line":345,"in_reply_to":"AAAAUH%2F%2BMlQ%3D","updated":"2014-02-03 23:31:49.000000000","message":"Seems like an important thing to have preview tell you that you\u0027re over the stack limit.. meaning you won\u0027t be able to deploy this stack anyway.","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"8f264d8a946ac355d72c1f67a63f58e307fbadc9","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        if db_api.stack_get_by_name(cnxt, stack_name):"},{"line_number":343,"context_line":"            raise exception.StackExists(stack_name\u003dstack_name)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        tenant_limit \u003d cfg.CONF.max_stacks_per_tenant"},{"line_number":346,"context_line":"        if db_api.stack_count_all_by_tenant(cnxt) \u003e\u003d tenant_limit:"},{"line_number":347,"context_line":"            message \u003d _(\"You have reached the maximum stacks per tenant, %d.\""},{"line_number":348,"context_line":"                        \" Please delete some stacks.\") % tenant_limit"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9vhU%3D","line":345,"in_reply_to":"AAAAUH%2F9yV8%3D","updated":"2014-02-06 16:51:07.000000000","message":"I agree with Clint.\n\nIMO, any validation that would be applied to a regular stack should be enforced when previewing it as well. Also, it makes very little sense to get a result back, try to deploy it and find out you\u0027re over the limit.","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"6d2476768ba08f0a9ce6695dadcf383860c71091","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        :param args: Request parameters/args passed from API"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        logger.info(_(\u0027template is %s\u0027) % template)"},{"line_number":371,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":372,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9rf0%3D","line":370,"updated":"2014-02-05 02:09:12.000000000","message":"are you seriously going to log the entire template?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"3989d41ded63f1fceb180b01f107bf5d744fb8ce","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        :param args: Request parameters/args passed from API"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        logger.info(_(\u0027template is %s\u0027) % template)"},{"line_number":371,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":372,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2F2iM%3D","line":370,"in_reply_to":"AAAAUH%2F9e00%3D","updated":"2014-02-10 12:15:14.000000000","message":"That log in create is historical, and it probably made sense when we first started developing heat, but now, IMO, it should be removed, or at least dropped to debug (like, guys are writing 1000 line templates now, and we started out with 10 line \"hello openstack world\" stuff ;)","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"a51acc0b53ca10682674ab5f6f858116f6915e5f","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        :param args: Request parameters/args passed from API"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        logger.info(_(\u0027template is %s\u0027) % template)"},{"line_number":371,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":372,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9e00%3D","line":370,"in_reply_to":"AAAAUH%2F9hUM%3D","updated":"2014-02-06 16:45:29.000000000","message":"I guess we can remove that.  The only reason we added this line was because that\u0027s how create_stack does it (see line 398 in this same file). ;)\n\nShould anything be logged in that regard?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"2741af4405bf53946112e60eec41700c1f88f125","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        :param args: Request parameters/args passed from API"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        logger.info(_(\u0027template is %s\u0027) % template)"},{"line_number":371,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":372,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9hUM%3D","line":370,"in_reply_to":"AAAAUH%2F9rf0%3D","updated":"2014-02-06 10:56:15.000000000","message":"Yeah I agree, lets not do that, and definitely not at info level :)","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":7230,"name":"Vijendar Komalla","email":"vijendar.komalla@rackspace.com","username":"vijendar"},"change_message_id":"c447a998b54c6da7de16bb2fdfc110749d44aee9","unresolved":false,"context_lines":[{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        logger.info(_(\u0027previewing stack %s\u0027) % stack_name)"},{"line_number":390,"context_line":"        tmpl \u003d parser.Template(template, files\u003dfiles)"},{"line_number":391,"context_line":"        self._validate_new_stack(cnxt, stack_name, tmpl)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"        common_params \u003d api.extract_args(args)"},{"line_number":394,"context_line":"        env \u003d environment.Environment(params)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2FWdg%3D","line":391,"updated":"2014-02-13 19:45:16.000000000","message":"since this is just a preview (and not creating any resources), do we really need this check here?\nI am thinking, we can defer this check to stack-create!","commit_id":"fb64a22b012ad1f90dfa4fdf62646b1fbabd6920"}],"heat/tests/test_engine_api_utils.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4b6d856feee6f66c2472ea84fbc98cf69372d872","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(parser.Stack, \u0027updated_time\u0027, new\u003dNone)"},{"line_number":176,"context_line":"    @mock.patch.object(parser.Stack, \u0027created_time\u0027, new\u003dNone)"},{"line_number":177,"context_line":"    @mock.patch.object(api, \u0027format_stack_resource\u0027)"},{"line_number":178,"context_line":"    @mock.patch.object(api, \u0027format_stack\u0027)"},{"line_number":179,"context_line":"    def test_format_stack_preview(self, mock_fmt_stack, mock_fmt_resource):"},{"line_number":180,"context_line":"        mock_fmt_stack.return_value \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bofk%3D","line":177,"updated":"2014-01-23 18:06:15.000000000","message":"my previous suggestions will break this all to hell, of course ;) Also, not too sure why you\u0027d want to mock the format calls in the first place, since you\u0027d want basically to create a stack object and pass it through the format code directly.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"58cef1dbaae75f83af190203f9f9cb87ff016d95","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(parser.Stack, \u0027updated_time\u0027, new\u003dNone)"},{"line_number":176,"context_line":"    @mock.patch.object(parser.Stack, \u0027created_time\u0027, new\u003dNone)"},{"line_number":177,"context_line":"    @mock.patch.object(api, \u0027format_stack_resource\u0027)"},{"line_number":178,"context_line":"    @mock.patch.object(api, \u0027format_stack\u0027)"},{"line_number":179,"context_line":"    def test_format_stack_preview(self, mock_fmt_stack, mock_fmt_resource):"},{"line_number":180,"context_line":"        mock_fmt_stack.return_value \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bi%2BQ%3D","line":177,"in_reply_to":"AAAAUH%2F%2Blmk%3D","updated":"2014-01-24 14:52:27.000000000","message":"I\u0027m actually getting rid of mock_format_stack, since it works fine with mocks. format_stack_resource however is trickier and is already tested on line 111, so I just want to test whether it\u0027s been called.  This will be changed in the next patch.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"2123737e3ed7185474d73d7b4d8732cabed6ab80","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(parser.Stack, \u0027updated_time\u0027, new\u003dNone)"},{"line_number":176,"context_line":"    @mock.patch.object(parser.Stack, \u0027created_time\u0027, new\u003dNone)"},{"line_number":177,"context_line":"    @mock.patch.object(api, \u0027format_stack_resource\u0027)"},{"line_number":178,"context_line":"    @mock.patch.object(api, \u0027format_stack\u0027)"},{"line_number":179,"context_line":"    def test_format_stack_preview(self, mock_fmt_stack, mock_fmt_resource):"},{"line_number":180,"context_line":"        mock_fmt_stack.return_value \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Blmk%3D","line":177,"in_reply_to":"AAAAUH%2F%2Bofk%3D","updated":"2014-01-24 04:10:45.000000000","message":"IMO, all we care about here is that resources are properly formatted in the stack. Since the formatting of the stack is tested elsewhere, I\u0027m only testing the resource formatting, without having to worry too much about what\u0027s needed to actually get a stack to work (template, parsing, validation, etc).\n\nAnyway, will change that after removing the formatting from the engine.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"}],"heat/tests/test_engine_service.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4b6d856feee6f66c2472ea84fbc98cf69372d872","unresolved":false,"context_lines":[{"line_number":2044,"context_line":"        self.assertIsInstance(stack_dependencies, dependencies.Dependencies)"},{"line_number":2045,"context_line":"        self.assertEqual(len(stack_dependencies.graph()), 2)"},{"line_number":2046,"context_line":""},{"line_number":2047,"context_line":"    @mock.patch.object(service.api, \u0027format_stack_preview\u0027)"},{"line_number":2048,"context_line":"    def test_preview_stack(self, mock_format):"},{"line_number":2049,"context_line":"        res._register_class(\u0027GenericResourceType\u0027,"},{"line_number":2050,"context_line":"                            generic_rsrc.GenericResource)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Boe0%3D","line":2047,"updated":"2014-01-23 18:06:15.000000000","message":"Again, dubious about the utility of the test if you mock the formatting, but then again, I think moving things around will make these tests very different.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"2123737e3ed7185474d73d7b4d8732cabed6ab80","unresolved":false,"context_lines":[{"line_number":2044,"context_line":"        self.assertIsInstance(stack_dependencies, dependencies.Dependencies)"},{"line_number":2045,"context_line":"        self.assertEqual(len(stack_dependencies.graph()), 2)"},{"line_number":2046,"context_line":""},{"line_number":2047,"context_line":"    @mock.patch.object(service.api, \u0027format_stack_preview\u0027)"},{"line_number":2048,"context_line":"    def test_preview_stack(self, mock_format):"},{"line_number":2049,"context_line":"        res._register_class(\u0027GenericResourceType\u0027,"},{"line_number":2050,"context_line":"                            generic_rsrc.GenericResource)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bllg%3D","line":2047,"in_reply_to":"AAAAUH%2F%2Boe0%3D","updated":"2014-01-24 04:10:45.000000000","message":"Here I actually agree. But the change will indeed make this go away.","commit_id":"6705a5f537d4dca57dd96cd3828a26b665893ec9"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"021faac9691597dd03a1968028215cb1e75b0d67","unresolved":false,"context_lines":[{"line_number":2115,"context_line":"        self.assertIsInstance(resources, list)"},{"line_number":2116,"context_line":"        self.assertEqual(1, len(resources))"},{"line_number":2117,"context_line":"        resource \u003d resources[0]"},{"line_number":2118,"context_line":"        self.assertEqual(resource[\u0027resource_type\u0027], \u0027GenericResourceType\u0027)"},{"line_number":2119,"context_line":"        self.assertEqual(resource[\u0027resource_name\u0027], \u0027A\u0027)"},{"line_number":2120,"context_line":"        self.assertEqual(resource[\u0027stack_name\u0027], \u0027foo\u0027)"},{"line_number":2121,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9yUU%3D","line":2118,"updated":"2014-02-03 23:31:49.000000000","message":"These assertEqual arguments are in the wrong order. (testtools.TestCase defines them as \"expected, observed\")","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"8f264d8a946ac355d72c1f67a63f58e307fbadc9","unresolved":false,"context_lines":[{"line_number":2115,"context_line":"        self.assertIsInstance(resources, list)"},{"line_number":2116,"context_line":"        self.assertEqual(1, len(resources))"},{"line_number":2117,"context_line":"        resource \u003d resources[0]"},{"line_number":2118,"context_line":"        self.assertEqual(resource[\u0027resource_type\u0027], \u0027GenericResourceType\u0027)"},{"line_number":2119,"context_line":"        self.assertEqual(resource[\u0027resource_name\u0027], \u0027A\u0027)"},{"line_number":2120,"context_line":"        self.assertEqual(resource[\u0027stack_name\u0027], \u0027foo\u0027)"},{"line_number":2121,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9vbg%3D","line":2118,"in_reply_to":"AAAAUH%2F9yUU%3D","updated":"2014-02-06 16:51:07.000000000","message":"Done","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"021faac9691597dd03a1968028215cb1e75b0d67","unresolved":false,"context_lines":[{"line_number":2139,"context_line":"        self.assertRaises(exception.StackExists, self.eng._validate_new_stack,"},{"line_number":2140,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2141,"context_line":""},{"line_number":2142,"context_line":"    @mock.patch.object(service.cfg.CONF, \u0027max_stacks_per_tenant\u0027, new\u003d3)"},{"line_number":2143,"context_line":"    @mock.patch.object(service.db_api, \u0027stack_count_all_by_tenant\u0027)"},{"line_number":2144,"context_line":"    def test__validate_new_stack_checks_stack_limit(self, mock_db_count):"},{"line_number":2145,"context_line":"        mock_db_count.return_value \u003d 99"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9yRA%3D","line":2142,"updated":"2014-02-03 23:31:49.000000000","message":"You don\u0027t need mock to do this.\n\n    service.cfg.CONF.set_override(\u0027max_stacks_per_tenant\u0027, 3)\n\nIt will be reset when the test is torn down by HeatTestCase\u0027s teardown processes.","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"8f264d8a946ac355d72c1f67a63f58e307fbadc9","unresolved":false,"context_lines":[{"line_number":2139,"context_line":"        self.assertRaises(exception.StackExists, self.eng._validate_new_stack,"},{"line_number":2140,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2141,"context_line":""},{"line_number":2142,"context_line":"    @mock.patch.object(service.cfg.CONF, \u0027max_stacks_per_tenant\u0027, new\u003d3)"},{"line_number":2143,"context_line":"    @mock.patch.object(service.db_api, \u0027stack_count_all_by_tenant\u0027)"},{"line_number":2144,"context_line":"    def test__validate_new_stack_checks_stack_limit(self, mock_db_count):"},{"line_number":2145,"context_line":"        mock_db_count.return_value \u003d 99"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9vbQ%3D","line":2142,"in_reply_to":"AAAAUH%2F9yRA%3D","updated":"2014-02-06 16:51:07.000000000","message":"Done","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"021faac9691597dd03a1968028215cb1e75b0d67","unresolved":false,"context_lines":[{"line_number":2147,"context_line":"                          self.eng._validate_new_stack,"},{"line_number":2148,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2149,"context_line":""},{"line_number":2150,"context_line":"    @mock.patch.object(service.cfg.CONF, \u0027max_resources_per_stack\u0027, new\u003d2)"},{"line_number":2151,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2152,"context_line":"        parsed_template \u003d {service.tpl.RESOURCES: [1, 2, 3]}"},{"line_number":2153,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9yQ4%3D","line":2150,"updated":"2014-02-03 23:31:49.000000000","message":"same here.","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"8f264d8a946ac355d72c1f67a63f58e307fbadc9","unresolved":false,"context_lines":[{"line_number":2147,"context_line":"                          self.eng._validate_new_stack,"},{"line_number":2148,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2149,"context_line":""},{"line_number":2150,"context_line":"    @mock.patch.object(service.cfg.CONF, \u0027max_resources_per_stack\u0027, new\u003d2)"},{"line_number":2151,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2152,"context_line":"        parsed_template \u003d {service.tpl.RESOURCES: [1, 2, 3]}"},{"line_number":2153,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9vbY%3D","line":2150,"in_reply_to":"AAAAUH%2F9yQ4%3D","updated":"2014-02-06 16:51:07.000000000","message":"Done","commit_id":"b46fa494f15bb227148590e25ab7003f9f746278"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"2741af4405bf53946112e60eec41700c1f88f125","unresolved":false,"context_lines":[{"line_number":2335,"context_line":"        stack \u003d self.eng.preview_stack(self.ctx, stack_name, tpl,"},{"line_number":2336,"context_line":"                                       params, files, args)"},{"line_number":2337,"context_line":"        resources \u003d stack[\u0027resources\u0027]"},{"line_number":2338,"context_line":"        self.assertIn(\u0027resources\u0027, stack)"},{"line_number":2339,"context_line":"        self.assertIsInstance(resources, list)"},{"line_number":2340,"context_line":"        self.assertEqual(1, len(resources))"},{"line_number":2341,"context_line":"        resource \u003d resources[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9hRw%3D","line":2338,"updated":"2014-02-06 10:56:15.000000000","message":"This assertIn is redundant, because you just dereferenced it the line above.","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"a51acc0b53ca10682674ab5f6f858116f6915e5f","unresolved":false,"context_lines":[{"line_number":2335,"context_line":"        stack \u003d self.eng.preview_stack(self.ctx, stack_name, tpl,"},{"line_number":2336,"context_line":"                                       params, files, args)"},{"line_number":2337,"context_line":"        resources \u003d stack[\u0027resources\u0027]"},{"line_number":2338,"context_line":"        self.assertIn(\u0027resources\u0027, stack)"},{"line_number":2339,"context_line":"        self.assertIsInstance(resources, list)"},{"line_number":2340,"context_line":"        self.assertEqual(1, len(resources))"},{"line_number":2341,"context_line":"        resource \u003d resources[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9ex0%3D","line":2338,"in_reply_to":"AAAAUH%2F9hRw%3D","updated":"2014-02-06 16:45:29.000000000","message":"Done","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"2741af4405bf53946112e60eec41700c1f88f125","unresolved":false,"context_lines":[{"line_number":2341,"context_line":"        resource \u003d resources[0]"},{"line_number":2342,"context_line":"        self.assertEqual(\u0027GenericResourceType\u0027, resource[\u0027resource_type\u0027])"},{"line_number":2343,"context_line":"        self.assertEqual(\u0027A\u0027, resource[\u0027resource_name\u0027])"},{"line_number":2344,"context_line":"        self.assertEqual(\u0027foo\u0027, resource[\u0027stack_name\u0027])"},{"line_number":2345,"context_line":""},{"line_number":2346,"context_line":"    def test_preview_stack_validates_stack(self):"},{"line_number":2347,"context_line":"        res._register_class(\u0027GenericResourceType\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9hQ0%3D","line":2344,"updated":"2014-02-06 10:56:15.000000000","message":"Would it be cleaner and more obvious here if you just defined a dict of the expected preview response, then did one assertEqual?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"fdce4969c21170ac269d86b0ac552edca88c5f63","unresolved":false,"context_lines":[{"line_number":2341,"context_line":"        resource \u003d resources[0]"},{"line_number":2342,"context_line":"        self.assertEqual(\u0027GenericResourceType\u0027, resource[\u0027resource_type\u0027])"},{"line_number":2343,"context_line":"        self.assertEqual(\u0027A\u0027, resource[\u0027resource_name\u0027])"},{"line_number":2344,"context_line":"        self.assertEqual(\u0027foo\u0027, resource[\u0027stack_name\u0027])"},{"line_number":2345,"context_line":""},{"line_number":2346,"context_line":"    def test_preview_stack_validates_stack(self):"},{"line_number":2347,"context_line":"        res._register_class(\u0027GenericResourceType\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9eaw%3D","line":2344,"in_reply_to":"AAAAUH%2F9ejI%3D","updated":"2014-02-06 16:59:26.000000000","message":"Does the fact that you don\u0027t care about testing it mean it shouldn\u0027t be in the response?\n\nFor example, this is a preview of *resources*, and no actual stack exists (other than the transient one used to create the preview, which the user doesn\u0027t care about), so why do we return stack name/identity/id, or even updated time?\n\nSeems like there is quite a bit of information here which is not valuable to the user and could be removed?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"a51acc0b53ca10682674ab5f6f858116f6915e5f","unresolved":false,"context_lines":[{"line_number":2341,"context_line":"        resource \u003d resources[0]"},{"line_number":2342,"context_line":"        self.assertEqual(\u0027GenericResourceType\u0027, resource[\u0027resource_type\u0027])"},{"line_number":2343,"context_line":"        self.assertEqual(\u0027A\u0027, resource[\u0027resource_name\u0027])"},{"line_number":2344,"context_line":"        self.assertEqual(\u0027foo\u0027, resource[\u0027stack_name\u0027])"},{"line_number":2345,"context_line":""},{"line_number":2346,"context_line":"    def test_preview_stack_validates_stack(self):"},{"line_number":2347,"context_line":"        res._register_class(\u0027GenericResourceType\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9ejI%3D","line":2344,"in_reply_to":"AAAAUH%2F9hQ0%3D","updated":"2014-02-06 16:45:29.000000000","message":"Here\u0027s an example of the whole dict:\n\n{\u0027description\u0027: \u0027\u0027,\n \u0027metadata\u0027: {},\n \u0027physical_resource_id\u0027: \u0027\u0027,\n \u0027required_by\u0027: [],\n \u0027resource_action\u0027: \u0027INIT\u0027,\n \u0027resource_identity\u0027: {\n                       \u0027path\u0027: \u0027/resources/A\u0027,\n                       \u0027stack_id\u0027: \u0027None\u0027,\n                       \u0027stack_name\u0027: \u0027foo\u0027,\n                       \u0027tenant\u0027: \u0027stack_service_test_tenant\u0027},\n \u0027resource_name\u0027: \u0027A\u0027,\n \u0027resource_status\u0027: \u0027COMPLETE\u0027,\n \u0027resource_status_reason\u0027: \u0027\u0027,\n \u0027resource_type\u0027: \u0027GenericResourceType\u0027,\n \u0027stack_identity\u0027: {\n                    \u0027path\u0027: \u0027\u0027,\n                    \u0027stack_id\u0027: \u0027None\u0027,\n                    \u0027stack_name\u0027: \u0027foo\u0027,\n                    \u0027tenant\u0027: \u0027stack_service_test_tenant\u0027},\n \u0027stack_name\u0027: \u0027foo\u0027,\n \u0027updated_time\u0027: \u00272014-02-06T16:23:12Z\u0027}\n\nIt seems to me that there are _lots_ of information in the stack and resource dicts that this test shouldn\u0027t really be concerned about. IMO, all it cares about is that there\u0027s a resource belonging to this stack, and the resource is the expected one (as defined in the template). For that, I was using type, name, and stack_name.\n\nWhat are your thoughts?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"2741af4405bf53946112e60eec41700c1f88f125","unresolved":false,"context_lines":[{"line_number":2358,"context_line":"                          self.ctx, stack_name, tpl, params, files, args)"},{"line_number":2359,"context_line":""},{"line_number":2360,"context_line":"    @mock.patch.object(service.db_api, \u0027stack_get_by_name\u0027)"},{"line_number":2361,"context_line":"    def test__validate_new_stack_checks_existing_stack(self, mock_stack_get):"},{"line_number":2362,"context_line":"        mock_stack_get.return_value \u003d \u0027existing_db_stack\u0027"},{"line_number":2363,"context_line":"        self.assertRaises(exception.StackExists, self.eng._validate_new_stack,"},{"line_number":2364,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9hOs%3D","line":2361,"updated":"2014-02-06 10:56:15.000000000","message":"double underscore typo in each of these tests","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"a51acc0b53ca10682674ab5f6f858116f6915e5f","unresolved":false,"context_lines":[{"line_number":2358,"context_line":"                          self.ctx, stack_name, tpl, params, files, args)"},{"line_number":2359,"context_line":""},{"line_number":2360,"context_line":"    @mock.patch.object(service.db_api, \u0027stack_get_by_name\u0027)"},{"line_number":2361,"context_line":"    def test__validate_new_stack_checks_existing_stack(self, mock_stack_get):"},{"line_number":2362,"context_line":"        mock_stack_get.return_value \u003d \u0027existing_db_stack\u0027"},{"line_number":2363,"context_line":"        self.assertRaises(exception.StackExists, self.eng._validate_new_stack,"},{"line_number":2364,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9eyI%3D","line":2361,"in_reply_to":"AAAAUH%2F9hOs%3D","updated":"2014-02-06 16:45:29.000000000","message":"Done","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"2741af4405bf53946112e60eec41700c1f88f125","unresolved":false,"context_lines":[{"line_number":2372,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2373,"context_line":""},{"line_number":2374,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2375,"context_line":"        service.cfg.CONF.set_override(\u0027max_resources_per_stack\u0027, 5)"},{"line_number":2376,"context_line":"        template \u003d {service.parser.Template.RESOURCES: [1, 2, 3, 4, 5, 6]}"},{"line_number":2377,"context_line":"        parsed_template \u003d service.parser.Template(template)"},{"line_number":2378,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9hNU%3D","line":2375,"updated":"2014-02-06 10:56:15.000000000","message":"Note cfg.CONF is a global thing, so you may get bitten by failures in a similar way to bug #1273126 - the fact that you\u0027re using different override values in the two tests seems to indicate that eventually testr will run them in parallel and one or other will fail.","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"d461d51c1f6b36a7bdf2acd074653f9034ca7560","unresolved":false,"context_lines":[{"line_number":2372,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2373,"context_line":""},{"line_number":2374,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2375,"context_line":"        service.cfg.CONF.set_override(\u0027max_resources_per_stack\u0027, 5)"},{"line_number":2376,"context_line":"        template \u003d {service.parser.Template.RESOURCES: [1, 2, 3, 4, 5, 6]}"},{"line_number":2377,"context_line":"        parsed_template \u003d service.parser.Template(template)"},{"line_number":2378,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2F2lw%3D","line":2375,"in_reply_to":"AAAAUH%2F9bwA%3D","updated":"2014-02-10 12:10:02.000000000","message":"\"massive\" change?!  Well it was certainly ugly, not not massive IIRC ;)\n\nWhatever, thanks Clint for the info, that is useful - I\u0027ll look at posting a patch which cleans things up in the light of that analysis.","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"e95dcb0fa95960a781b72e2188d5b338a2d5c2c1","unresolved":false,"context_lines":[{"line_number":2372,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2373,"context_line":""},{"line_number":2374,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2375,"context_line":"        service.cfg.CONF.set_override(\u0027max_resources_per_stack\u0027, 5)"},{"line_number":2376,"context_line":"        template \u003d {service.parser.Template.RESOURCES: [1, 2, 3, 4, 5, 6]}"},{"line_number":2377,"context_line":"        parsed_template \u003d service.parser.Template(template)"},{"line_number":2378,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9bwA%3D","line":2375,"in_reply_to":"AAAAUH%2F9eZI%3D","updated":"2014-02-06 22:53:03.000000000","message":"There is a right way.\n\ntestr runs parallel processes, not threads, so there is no reason overrides of a global _variable_ would interact like that.\n\nThe problem, I believe, is that testr runs and load tests in a different order, and the config option group referenced by set_override were not imported using this code:\n\n    cfg.CONF.import_group(\u0027keystone_authtoken\u0027, \u0027keystoneclient.middleware.auth_token\u0027)\n\nat the root level of test_heatclient. We need to do that because middleware is optional and thus we can\u0027t just rely on the option groups being there when we import heat_keystoneclient.\n\nSo the massive change there was not needed. :-/\n\nIn this particular file, we likely won\u0027t ever need to use import_opts for the ones being tested because they are in heat.common.config which is imported all over the place, but it certainly wouldn\u0027t hurt to be more explicit.","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"fdce4969c21170ac269d86b0ac552edca88c5f63","unresolved":false,"context_lines":[{"line_number":2372,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2373,"context_line":""},{"line_number":2374,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2375,"context_line":"        service.cfg.CONF.set_override(\u0027max_resources_per_stack\u0027, 5)"},{"line_number":2376,"context_line":"        template \u003d {service.parser.Template.RESOURCES: [1, 2, 3, 4, 5, 6]}"},{"line_number":2377,"context_line":"        parsed_template \u003d service.parser.Template(template)"},{"line_number":2378,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9eZI%3D","line":2375,"in_reply_to":"AAAAUH%2F9eyM%3D","updated":"2014-02-06 16:59:26.000000000","message":"Well I\u0027m not sure there is *a* right way to do it, but check out bug #1273126 and see the issues I encountered, and the fix I ended up using.  Maybe there\u0027s a better way, but it seems to have solved the issue, maybe Clint has some further insight to share here?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"a51acc0b53ca10682674ab5f6f858116f6915e5f","unresolved":false,"context_lines":[{"line_number":2372,"context_line":"                          self.ctx, \u0027test_existing_stack\u0027, \u0027parsed_template\u0027)"},{"line_number":2373,"context_line":""},{"line_number":2374,"context_line":"    def test__validate_new_stack_checks_resource_limit(self):"},{"line_number":2375,"context_line":"        service.cfg.CONF.set_override(\u0027max_resources_per_stack\u0027, 5)"},{"line_number":2376,"context_line":"        template \u003d {service.parser.Template.RESOURCES: [1, 2, 3, 4, 5, 6]}"},{"line_number":2377,"context_line":"        parsed_template \u003d service.parser.Template(template)"},{"line_number":2378,"context_line":"        self.assertRaises(exception.RequestLimitExceeded,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9eyM%3D","line":2375,"in_reply_to":"AAAAUH%2F9hNU%3D","updated":"2014-02-06 16:45:29.000000000","message":"So, we had it mocked in the previous patches, but there were comments on the previous patch saying that we didn\u0027t have to mock it because it would get reset by HeatTestCase tearDown (https://review.openstack.org/#/c/65576/4/heat/tests/test_engine_service.py).\n\nWhat\u0027s the correct way to do it?","commit_id":"3902883872fc0909d5e8216f837a1bf7627d86dc"}]}
