Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Sep 11, 2024
1 parent 40840f8 commit 5c9c606
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pkg/agent/cmd/enroll_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 5c9c606

Please sign in to comment.