)]}'
{"nova/tests/unit/virt/disk/mount/test_nbd.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51fa95fa7336bc93fad122ade8c6392cb7bad509","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        self.assertFalse(n.get_dev())"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @mock.patch(\u0027nova.privsep.fs.mount\u0027,"},{"line_number":250,"context_line":"                mock.create_autospec(fs.mount.args[0], return_value\u003d(\u0027\u0027, \u0027broken\u0027)))"},{"line_number":251,"context_line":"    def test_do_mount_need_to_specify_fs_type(self):"},{"line_number":252,"context_line":"        # NOTE(mikal): Bug 1094373 saw a regression where we failed to"},{"line_number":253,"context_line":"        # communicate a failed mount properly."}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_86d7bb4b","line":250,"updated":"2019-06-26 19:18:28.000000000","message":"This works, but ew. You\u0027re dissecting a partial(), which depends on the inner workings of a separate library (oslo.privsep) not changing, which it has no obligation to do.\n\nWhat\u0027s wrong with assert_called_once_with?","commit_id":"59b5775bad9271ba742d790da2472dae5a81c992"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9167b432389646b5db4dd6ba7b8184dc20ecd07","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertFalse(mount.do_mount())"},{"line_number":263,"context_line":"        mock_mount.assert_called_once_with("},{"line_number":264,"context_line":"                mock.ANY, mock.ANY, mock.ANY, mock.ANY)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_connect\u0027)"},{"line_number":267,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_disconnect\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_05fae041","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":54},"updated":"2019-06-26 22:03:03.000000000","message":"Couldn\u0027t this at least be:\n\n(None, None, tempdir, None)\n\nAnd if we passed device\u003dmock.sentinel.device to NbdMount init above we could have:\n\n(None, mock.sentinel.device, tempdir, None)","commit_id":"726e1e1cc597832dbf2c265caeea145b816eb215"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2002dfa662ba1db7219cb97642ce2e7d52649b5","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertFalse(mount.do_mount())"},{"line_number":263,"context_line":"        mock_mount.assert_called_once_with("},{"line_number":264,"context_line":"                mock.ANY, mock.ANY, mock.ANY, mock.ANY)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_connect\u0027)"},{"line_number":267,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_disconnect\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_2816d94a","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":54},"in_reply_to":"9fb8cfa7_05fae041","updated":"2019-06-26 22:14:18.000000000","message":"I guess creating the NbdMount with a fake device string makes things blow up in weird ways but we could still do a better job of asserting the mock call like this:\n\ndiff --git a/nova/tests/unit/virt/disk/mount/test_nbd.py b/nova/tests/unit/virt/disk/mount/test_nbd.py\nindex e5f3bfd32a..0d52c67c26 100644\n--- a/nova/tests/unit/virt/disk/mount/test_nbd.py\n+++ b/nova/tests/unit/virt/disk/mount/test_nbd.py\n@@ -261,7 +261,7 @@ class NbdTestCase(test.NoDBTestCase):\n \n         self.assertFalse(mount.do_mount())\n         mock_mount.assert_called_once_with(\n-                mock.ANY, mock.ANY, mock.ANY, mock.ANY)\n+                None, None, tempdir, None)\n \n     @mock.patch(\u0027nova.privsep.fs.nbd_connect\u0027)\n     @mock.patch(\u0027nova.privsep.fs.nbd_disconnect\u0027)","commit_id":"726e1e1cc597832dbf2c265caeea145b816eb215"},{"author":{"_account_id":19490,"name":"Miguel Ángel Herranz Trillo","email":"miguel@midokura.com","username":"maht"},"change_message_id":"f616003d75d2ac092fb2bb32e0eb0f32e151a388","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertFalse(mount.do_mount())"},{"line_number":263,"context_line":"        mock_mount.assert_called_once_with("},{"line_number":264,"context_line":"                mock.ANY, mock.ANY, mock.ANY, mock.ANY)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_connect\u0027)"},{"line_number":267,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_disconnect\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_e51f8c69","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":54},"in_reply_to":"9fb8cfa7_05fae041","updated":"2019-06-26 22:15:41.000000000","message":"Yes, I guess it would be more accurate. I could add it.","commit_id":"726e1e1cc597832dbf2c265caeea145b816eb215"},{"author":{"_account_id":19490,"name":"Miguel Ángel Herranz Trillo","email":"miguel@midokura.com","username":"maht"},"change_message_id":"c3978f6021b82d4b70aafa11a24ad3b0653db672","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertFalse(mount.do_mount())"},{"line_number":263,"context_line":"        mock_mount.assert_called_once_with("},{"line_number":264,"context_line":"                mock.ANY, mock.ANY, mock.ANY, mock.ANY)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_connect\u0027)"},{"line_number":267,"context_line":"    @mock.patch(\u0027nova.privsep.fs.nbd_disconnect\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_c8761da5","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":54},"in_reply_to":"9fb8cfa7_2816d94a","updated":"2019-06-26 22:18:53.000000000","message":"I just see your comment: I think is so small I could just add it myself, thanks for the improvement.","commit_id":"726e1e1cc597832dbf2c265caeea145b816eb215"}],"nova/virt/disk/mount/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0626dbfaabf2fec1709d61310765fb5a458d2e50","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            return"},{"line_number":264,"context_line":"        self.flush_dev()"},{"line_number":265,"context_line":"        LOG.debug(\"Umount %s\", self.mapped_device)"},{"line_number":266,"context_line":"        nova.privsep.fs.umount(self.mapped_device)"},{"line_number":267,"context_line":"        self.mounted \u003d False"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def flush_dev(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_254284ac","line":266,"range":{"start_line":266,"start_character":24,"end_line":266,"end_character":30},"updated":"2019-06-26 21:55:07.000000000","message":"Unrelated really but shouldn\u0027t the name of the arg on this method be \"device\" rather than \"mountpoint\"?\n\nhttps://github.com/openstack/nova/blob/6e59cc3f518367b5ef55c1ec81cc53cdb736dbea/nova/privsep/fs.py#L44","commit_id":"726e1e1cc597832dbf2c265caeea145b816eb215"},{"author":{"_account_id":19490,"name":"Miguel Ángel Herranz Trillo","email":"miguel@midokura.com","username":"maht"},"change_message_id":"f616003d75d2ac092fb2bb32e0eb0f32e151a388","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            return"},{"line_number":264,"context_line":"        self.flush_dev()"},{"line_number":265,"context_line":"        LOG.debug(\"Umount %s\", self.mapped_device)"},{"line_number":266,"context_line":"        nova.privsep.fs.umount(self.mapped_device)"},{"line_number":267,"context_line":"        self.mounted \u003d False"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def flush_dev(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_2553643b","line":266,"range":{"start_line":266,"start_character":24,"end_line":266,"end_character":30},"in_reply_to":"9fb8cfa7_254284ac","updated":"2019-06-26 22:15:41.000000000","message":"As far as I know umount accept either the device or the mountpoint (since both are given to mount/fstab). I just checked my \"man umount\" and the synopsis of the command says: \"umount [-dflnrv] {directory|device}...\" so I guess mountpoint is better than directory. Maybe it could be changed to `device_or_mountpoint`","commit_id":"726e1e1cc597832dbf2c265caeea145b816eb215"}]}
