From 126519bf26b9d1152e9ca1a094a912168b7a67d5 Mon Sep 17 00:00:00 2001 From: Damyan Yordanov Date: Tue, 17 Sep 2024 17:50:31 +0200 Subject: [PATCH] Change test wording --- plugins/metal/plugin_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/metal/plugin_test.go b/plugins/metal/plugin_test.go index 1d046ba..ed20c18 100644 --- a/plugins/metal/plugin_test.go +++ b/plugins/metal/plugin_test.go @@ -95,10 +95,8 @@ var _ = Describe("Endpoint", func() { }) It("Should return error if config file does not exist", func() { - Expect(func() error { - err := loadConfig("do-not-exist.json") - return err - }).ShouldNot(BeNil()) + err := loadConfig("does-not-exist.json") + Expect(err).NotTo(BeNil()) }) It("Should return empty machine list if the config file is malformed", func() {