Skip to content

Commit

Permalink
storage: fix zpool-key-foo cruft from unit tests
Browse files Browse the repository at this point in the history
test_guided_zfs_luks_keystore() causes a file named zpool-key-foo to be
created, clean that up.
  • Loading branch information
dbungert committed Jan 28, 2025
1 parent bc5a03a commit 3cc24f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions subiquity/server/controllers/tests/test_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import copy
import subprocess
import uuid
from pathlib import Path
from unittest import IsolatedAsyncioTestCase, mock

import attrs
Expand Down Expand Up @@ -1047,6 +1048,9 @@ async def test_guided_zfs_luks_keystore(self, bootloader, ptable, p1mnt):
self.assertEqual("luks_keystore", rpool.encryption_style)
with open(rpool.keyfile) as fp:
self.assertEqual("passw0rd", fp.read())
# a tempfile is created outside of normal test tempfiles,
# clean that up
Path(rpool.keyfile).unlink()
[bpool] = self.model._all(type="zpool", pool="bpool")
self.assertIsNone(bpool.path)
self.assertEqual([boot], bpool.vdevs)
Expand Down

0 comments on commit 3cc24f8

Please sign in to comment.