From fc243b4d6b881f1644537a1bcc63e0ca9123eecb Mon Sep 17 00:00:00 2001 From: Itxaka Date: Mon, 24 Jul 2023 09:49:37 +0200 Subject: [PATCH] :robot: Add guards to UKI test So we dont start the vm without the required env vars Signed-off-by: Itxaka --- tests/uki_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/uki_test.go b/tests/uki_test.go index 32de9bf17..1144c0976 100644 --- a/tests/uki_test.go +++ b/tests/uki_test.go @@ -4,12 +4,22 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/spectrocloud/peg/matcher" + "os" "strings" ) -var _ = Describe("kairos UKI test", Label("uki"), func() { +var _ = Describe("kairos UKI test", Label("uki"), Ordered, func() { var vm VM + BeforeAll(func() { + if os.Getenv("UKI_DRIVE") == "" { + Fail("UKI_DRIVE environment variable set to a UKI disk is needed for UKI test") + } + if os.Getenv("FIRMWARE") == "" { + Fail("FIRMWARE environment variable set to a EFI firmware is needed for UKI test") + } + }) + BeforeEach(func() { _, vm = startVM() vm.EventuallyConnects(1200)