From 5c9c60629b7b47d8b350f897f792431ce6d515e1 Mon Sep 17 00:00:00 2001 From: Anderson Queiroz Date: Wed, 11 Sep 2024 09:36:36 +0200 Subject: [PATCH] fix tests --- internal/pkg/agent/cmd/enroll_cmd_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/pkg/agent/cmd/enroll_cmd_test.go b/internal/pkg/agent/cmd/enroll_cmd_test.go index bb2bd203135..434198dc2f8 100644 --- a/internal/pkg/agent/cmd/enroll_cmd_test.go +++ b/internal/pkg/agent/cmd/enroll_cmd_test.go @@ -639,6 +639,7 @@ func TestValidateEnrollFlags(t *testing.T) { t.Run("elastic-agent-cert-key does not require key-passphrase", func(t *testing.T) { cmd := newEnrollCommandWithArgs([]string{}, streams) err := cmd.Flags().Set("elastic-agent-cert-key", "/path/to/elastic-agent-cert-key") + require.NoError(t, err, "could not set flag 'elastic-agent-cert-key'") err = validateEnrollFlags(cmd) @@ -648,6 +649,7 @@ func TestValidateEnrollFlags(t *testing.T) { t.Run("elastic-agent-cert-key-passphrase requires certificate and key", func(t *testing.T) { cmd := newEnrollCommandWithArgs([]string{}, streams) err := cmd.Flags().Set("elastic-agent-cert-key-passphrase", "/path/to/elastic-agent-cert-key-passphrase") + require.NoError(t, err, "could not set flag 'elastic-agent-cert-key-passphrase'") err = validateEnrollFlags(cmd)