From: Christoph Hellwig Date: Sat, 26 Mar 2016 17:14:02 +0000 (+0100) Subject: tests: check that the nguid is properly saved and restored X-Git-Tag: v0.2~20 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=817f0b604ee34ba510e68720c59bc74549820ed0;p=users%2Fhch%2Fnvmetcli.git tests: check that the nguid is properly saved and restored Signed-off-by: Christoph Hellwig --- diff --git a/nvmet/test_nvmet.py b/nvmet/test_nvmet.py index 7696590..b092baa 100644 --- a/nvmet/test_nvmet.py +++ b/nvmet/test_nvmet.py @@ -156,6 +156,8 @@ class TestNvmet(unittest.TestCase): n.set_attr('device', 'path', '/dev/ram0') n.set_enable(1) + nguid = n.get_attr('device', 'nguid') + root.save_to_file('test.json') root.clear_existing() root.restore_from_file('test.json') @@ -174,3 +176,4 @@ class TestNvmet(unittest.TestCase): # and check everything is still the same self.assertTrue(n.get_enable()) self.assertEqual(n.get_attr('device', 'path'), '/dev/ram0') + self.assertEqual(n.get_attr('device', 'nguid'), nguid)