)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"428735c70bc43bbb68e8f6aa56e5cd63a66ecefb","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     jiahui.qiang \u003cjiahui.qiang@easystack.cn\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-06 18:35:28 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"functional test for volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Rework functional tests to remove resource create/delete from"},{"line_number":10,"context_line":"setupClass() and teardownClass() methods."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba5201f7_e27ecf68","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":26},"updated":"2017-01-06 11:26:29.000000000","message":"refactor* functional test for volume","commit_id":"eaa15e63aaf5cf953c2e329d8f0d32d7fa10150d"}],"openstackclient/tests/functional/volume/v2/test_volume.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"428735c70bc43bbb68e8f6aa56e5cd63a66ecefb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            \u0027--size 1 \u0027 +"},{"line_number":72,"context_line":"            name1"},{"line_number":73,"context_line":"        )"},{"line_number":74,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name1)"},{"line_number":75,"context_line":"        self.assertEqual("},{"line_number":76,"context_line":"            \u00271\u0027,"},{"line_number":77,"context_line":"            re.search(self.re_size, raw_output).group(1),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_0276736f","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":65},"updated":"2017-01-06 11:26:29.000000000","message":"the other refactors don\u0027t use addCleanup() calls, they instead call delete directly (which the clean up does) [1].\n\nI realize they are functionally equivalent, with the clean ups happening after the test, i\u0027m wondering if anyone has a preference? i would prefer the tests all \"look\" the same.\n\n[1] https://github.com/openstack/python-openstackclient/blob/3da71c819d1ecda6a629ccd75d26237d8ce8f470/openstackclient/tests/functional/network/v2/test_floating_ip.py#L88-L90","commit_id":"eaa15e63aaf5cf953c2e329d8f0d32d7fa10150d"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"d24bf533af4638ddcce5d8a68bf207d6eb8f4473","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            \u0027--size 1 \u0027 +"},{"line_number":72,"context_line":"            name1"},{"line_number":73,"context_line":"        )"},{"line_number":74,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name1)"},{"line_number":75,"context_line":"        self.assertEqual("},{"line_number":76,"context_line":"            \u00271\u0027,"},{"line_number":77,"context_line":"            re.search(self.re_size, raw_output).group(1),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_496c1e9c","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":65},"in_reply_to":"ba5201f7_0276736f","updated":"2017-01-06 14:00:07.000000000","message":"If the main goal of the test is NOT to test deletion, then we should use addCleanup(...). Because addCleanup will be executed regardless of whether the test failed, so the cleanup will happen for sure.","commit_id":"eaa15e63aaf5cf953c2e329d8f0d32d7fa10150d"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"d24bf533af4638ddcce5d8a68bf207d6eb8f4473","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            re.search(\"\\|\\s+\" + name1 + \"\\s+\\|\\s+error\", raw_output)"},{"line_number":116,"context_line":"        )"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # TODO(qiangjiahui): Add project option to filter tests when we can"},{"line_number":119,"context_line":"        # specify volume with project"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_volume_set(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_69fe42af","line":118,"updated":"2017-01-06 14:00:07.000000000","message":"Yes that would be great. Currently there\u0027s several tests we can\"t do because the func test suite runs under a single openstack user.","commit_id":"eaa15e63aaf5cf953c2e329d8f0d32d7fa10150d"},{"author":{"_account_id":24080,"name":"jiahui.qiang","email":"jiahui.qiang@easystack.cn","username":"qiangjiahui"},"change_message_id":"b5a8f258574145725a57bc426a39719ad9aeb523","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            re.search(\"\\|\\s+\" + name1 + \"\\s+\\|\\s+error\", raw_output)"},{"line_number":116,"context_line":"        )"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # TODO(qiangjiahui): Add project option to filter tests when we can"},{"line_number":119,"context_line":"        # specify volume with project"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_volume_set(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_6a40f107","line":118,"in_reply_to":"ba5201f7_69fe42af","updated":"2017-01-06 15:14:53.000000000","message":"Although we can use \u0027project\u0027 option to create volume. But actually the new volume is still belong to the current domain.:(","commit_id":"eaa15e63aaf5cf953c2e329d8f0d32d7fa10150d"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c649bf46e42c7954196d488f8b967b2da1423ff9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            \u0027--size 1 \u0027 +"},{"line_number":58,"context_line":"            name1"},{"line_number":59,"context_line":"        ))"},{"line_number":60,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name1)"},{"line_number":61,"context_line":"        self.assertEqual("},{"line_number":62,"context_line":"            1,"},{"line_number":63,"context_line":"            cmd_output[\"size\"],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_1bcac06d","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":65},"updated":"2017-01-16 14:10:54.000000000","message":"nit, i don\u0027t know how others feel about this, but i\u0027d prefer to have the cleanups at the end of the test, they are distracting when placed in line","commit_id":"07ade2266c80e47541f9e621e90e337cff69d56b"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"f8bd3bc10eceb60561f873b5de49c7852d26adc4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            \u0027--size 1 \u0027 +"},{"line_number":58,"context_line":"            name1"},{"line_number":59,"context_line":"        ))"},{"line_number":60,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name1)"},{"line_number":61,"context_line":"        self.assertEqual("},{"line_number":62,"context_line":"            1,"},{"line_number":63,"context_line":"            cmd_output[\"size\"],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_9f7852c6","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":65},"in_reply_to":"7a3c09a3_1bcac06d","updated":"2017-01-16 16:42:12.000000000","message":"That won\u0027t work. If an assertion fails before your addCleanup call, then the cleanup method will not be registered thus never called. addCleanup must be called right after resource creation/initialization.","commit_id":"07ade2266c80e47541f9e621e90e337cff69d56b"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"e87bbf8fd0e758b47f8a69a406baca3a42037ad6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            \u0027--size 1 \u0027 +"},{"line_number":58,"context_line":"            name1"},{"line_number":59,"context_line":"        ))"},{"line_number":60,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name1)"},{"line_number":61,"context_line":"        self.assertEqual("},{"line_number":62,"context_line":"            1,"},{"line_number":63,"context_line":"            cmd_output[\"size\"],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_89dc98e5","line":60,"in_reply_to":"7a3c09a3_1bcac06d","updated":"2017-01-16 18:22:38.000000000","message":"This is written the way I have been doing it now, the only time I think we shouldn\u0027t be using addCleanup() is in the explicit delete tests where we test multiple deletes in a single command.","commit_id":"07ade2266c80e47541f9e621e90e337cff69d56b"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"987f243d314ed3bc95d13b24a653197718732753","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            \u0027--size 1 \u0027 +"},{"line_number":58,"context_line":"            name1"},{"line_number":59,"context_line":"        ))"},{"line_number":60,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name1)"},{"line_number":61,"context_line":"        self.assertEqual("},{"line_number":62,"context_line":"            1,"},{"line_number":63,"context_line":"            cmd_output[\"size\"],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_e7046019","line":60,"in_reply_to":"7a3c09a3_89dc98e5","updated":"2017-01-16 20:17:56.000000000","message":"ah good point jordan","commit_id":"07ade2266c80e47541f9e621e90e337cff69d56b"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c649bf46e42c7954196d488f8b967b2da1423ff9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            \u0027--size 2 \u0027 +"},{"line_number":71,"context_line":"            name2"},{"line_number":72,"context_line":"        ))"},{"line_number":73,"context_line":"        self.addCleanup(self.openstack, \u0027volume delete \u0027 + name2)"},{"line_number":74,"context_line":"        self.assertEqual("},{"line_number":75,"context_line":"            2,"},{"line_number":76,"context_line":"            cmd_output[\"size\"],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_7b8ca435","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":65},"updated":"2017-01-16 14:10:54.000000000","message":"same","commit_id":"07ade2266c80e47541f9e621e90e337cff69d56b"}]}
