diff --git a/tests/functional/pyocf/types/volume.py b/tests/functional/pyocf/types/volume.py index 30eb174..d82ed1c 100644 --- a/tests/functional/pyocf/types/volume.py +++ b/tests/functional/pyocf/types/volume.py @@ -187,7 +187,11 @@ class Volume: Volume._instances_[ref] = volume volume.handle = ref - return volume.do_open() + ret = volume.do_open() + if ret == 0: + volume.opened = True + + return ret @classmethod def get_io_ops(cls): @@ -255,7 +259,6 @@ class Volume: self.opened = False def do_open(self): - self.opened = True return 0 def close(self):