Skip to content
Snippets Groups Projects
Commit 817f0b60 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

tests: check that the nguid is properly saved and restored


Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 8f7cac95
No related branches found
No related tags found
No related merge requests found
...@@ -156,6 +156,8 @@ class TestNvmet(unittest.TestCase): ...@@ -156,6 +156,8 @@ class TestNvmet(unittest.TestCase):
n.set_attr('device', 'path', '/dev/ram0') n.set_attr('device', 'path', '/dev/ram0')
n.set_enable(1) n.set_enable(1)
nguid = n.get_attr('device', 'nguid')
root.save_to_file('test.json') root.save_to_file('test.json')
root.clear_existing() root.clear_existing()
root.restore_from_file('test.json') root.restore_from_file('test.json')
...@@ -174,3 +176,4 @@ class TestNvmet(unittest.TestCase): ...@@ -174,3 +176,4 @@ class TestNvmet(unittest.TestCase):
# and check everything is still the same # and check everything is still the same
self.assertTrue(n.get_enable()) self.assertTrue(n.get_enable())
self.assertEqual(n.get_attr('device', 'path'), '/dev/ram0') self.assertEqual(n.get_attr('device', 'path'), '/dev/ram0')
self.assertEqual(n.get_attr('device', 'nguid'), nguid)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment