command/audit: improve audit enable type missing error message (#16409)

* command/audit: improve audit enable type missing error message

* changelog
This commit is contained in:
Jason O'Donnell
2022-07-21 16:43:50 -04:00
committed by GitHub
parent 7e0d618dfa
commit 522f14a47d
3 changed files with 5 additions and 2 deletions

3
changelog/16409.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:improvement
command/audit: Improve missing type error message
```

View File

@@ -110,7 +110,7 @@ func (c *AuditEnableCommand) Run(args []string) int {
args = f.Args()
if len(args) < 1 {
c.UI.Error("Missing TYPE!")
c.UI.Error("Error enabling audit device: audit type missing. Valid types include 'file', 'socket' and 'syslog'.")
return 1
}

View File

@@ -32,7 +32,7 @@ func TestAuditEnableCommand_Run(t *testing.T) {
{
"empty",
nil,
"Missing TYPE!",
"Error enabling audit device: audit type missing. Valid types include 'file', 'socket' and 'syslog'.",
1,
},
{