Skip to content

Commit

Permalink
fixup! tests: zfs: add native zfs encryption tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyphar committed Nov 21, 2024
1 parent ec1b82d commit 363472b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/suites/storage_driver_zfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ do_zfs_encryption() {
-O keylocation="file://$zpool_keyfile" \
"$zpool_name" "$zpool_vdev"

zpool status
zfs get -H -o name,property,value keystatus "$zpool_name"

incus storage create zpool_encrypted zfs source="$zpool_name"

# Make sure that incus sees that the pool is imported.
Expand All @@ -95,6 +98,9 @@ do_zfs_encryption() {
# Restart Incus.
incus admin waitready

zpool status
zfs get -H -o name,property,value keystatus "$zpool_name"

# The keys should've been re-imported automatically by Incus.
zfs get -H -o name,property,value keystatus "$zpool_name" | grep -q "$zpool_name\tkeystatus\tavailable"
incus storage list -f csv -c nDs | grep -q "zpool_encrypted,zfs,CREATED"
Expand All @@ -110,6 +116,7 @@ do_zfs_encryption() {
incus admin shutdown

# The pool should be exported now.
zpool status
! zpool status "$zpool_name" 2>/dev/null

# Restart Incus.
Expand Down

0 comments on commit 363472b

Please sign in to comment.