platformtests: fix skipping encryption-only tests on systems that don't support encryption

(Or split the test into two tests  of which one is skipped depending on encryption support)
This commit is contained in:
Christian Schwarz
2020-09-05 16:04:34 +02:00
parent b1f8cdf385
commit 0c189265e8
3 changed files with 28 additions and 12 deletions

View File

@@ -10,6 +10,14 @@ import (
)
func ReceiveForceIntoEncryptedErr(ctx *platformtest.Context) {
supported, err := zfs.EncryptionCLISupported(ctx)
require.NoError(ctx, err, "encryption feature test failed")
if !supported {
ctx.SkipNow()
return
}
platformtest.Run(ctx, platformtest.PanicErr, ctx.RootDataset, `
DESTROYROOT
CREATEROOT