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 c0b0c4fde7
commit d25a3526af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,
},
{