mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
Segment out disk checks to disable on openbsd/arm (#11749)
* Segment out disk checks to disable on openbsd/arm Also add a spot skipped helper. * Expected results may be fewer than actual because of variable length tests like disk usage * Move to os_common and build on windows
This commit is contained in:
@@ -40,9 +40,20 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) {
|
||||
},
|
||||
[]*diagnose.Result{
|
||||
{
|
||||
Name: "open file limits",
|
||||
Name: "operating system",
|
||||
Status: diagnose.OkStatus,
|
||||
Children: []*diagnose.Result{
|
||||
{
|
||||
Name: "open file limits",
|
||||
Status: diagnose.OkStatus,
|
||||
},
|
||||
{
|
||||
Name: "disk usage",
|
||||
Status: diagnose.OkStatus,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
Name: "parse-config",
|
||||
Status: diagnose.OkStatus,
|
||||
@@ -331,7 +342,7 @@ func compareResult(exp *diagnose.Result, act *diagnose.Result) error {
|
||||
return fmt.Errorf("section %s, warning message not found: %s in %s", exp.Name, exp.Warnings[j], act.Warnings[j])
|
||||
}
|
||||
}
|
||||
if len(exp.Children) != len(act.Children) {
|
||||
if len(exp.Children) > len(act.Children) {
|
||||
errStrings := []string{}
|
||||
for _, c := range act.Children {
|
||||
errStrings = append(errStrings, fmt.Sprintf("%+v", c))
|
||||
|
||||
Reference in New Issue
Block a user