Comment 5 for bug 1814373

Still need to fix it so it will exit when unit is failed, and maybe after some timeout.

---
 debian/tests/storage | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/tests/storage b/debian/tests/storage
index 04d11c8..47fbe81 100755
--- a/debian/tests/storage
+++ b/debian/tests/storage
@@ -73,6 +73,8 @@ class CryptsetupTest(FakeDriveTestBase):
         subprocess.call(['umount', self.plaintext_dev], stderr=subprocess.DEVNULL)
         subprocess.call(['systemctl', 'start', '--no-ask-password', 'systemd-cryptsetup@%s.service' % self.plaintext_name],
                         stderr=subprocess.STDOUT)
+ while subprocess.call(['systemctl', 'is-active', 'systemd-cryptsetup@%s.service' % self.plaintext_name], stderr=subprocess.STDOUT) != 0:
+ pass
         subprocess.call(['systemctl', 'stop', 'systemd-cryptsetup@%s.service' % self.plaintext_name],
                         stderr=subprocess.STDOUT)
         if os.path.exists('/etc/crypttab'):
--