mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Add ulimit check, and tidy unit test cases (#11678)
* Add ulimit check, and tidy unit test cases to avoid needing to have all results and perfect ordering * Make order independent check recursive * Fix unit tests * Try a 5s request timeout
This commit is contained in:
@@ -39,6 +39,31 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) {
|
||||
"-config", "./server/test-fixtures/config_diagnose_ok.hcl",
|
||||
},
|
||||
[]*diagnose.Result{
|
||||
{
|
||||
Name: "open file limits",
|
||||
Status: diagnose.OkStatus,
|
||||
},
|
||||
{
|
||||
Name: "parse-config",
|
||||
Status: diagnose.OkStatus,
|
||||
},
|
||||
{
|
||||
Name: "init-listeners",
|
||||
Status: diagnose.WarningStatus,
|
||||
Children: []*diagnose.Result{
|
||||
{
|
||||
Name: "create-listeners",
|
||||
Status: diagnose.OkStatus,
|
||||
},
|
||||
{
|
||||
Name: "check-listener-tls",
|
||||
Status: diagnose.WarningStatus,
|
||||
Warnings: []string{
|
||||
"TLS is disabled in a Listener config stanza.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "storage",
|
||||
Status: diagnose.OkStatus,
|
||||
@@ -314,6 +339,10 @@ func compareResult(exp *diagnose.Result, act *diagnose.Result) error {
|
||||
return fmt.Errorf(strings.Join(errStrings, ","))
|
||||
}
|
||||
|
||||
if len(exp.Children) > 0 {
|
||||
return compareResults(exp.Children, act.Children)
|
||||
}
|
||||
|
||||
if len(exp.Children) > 0 {
|
||||
return compareResults(exp.Children, act.Children)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user