Add detailed comparison assertions
This commit is contained in:
@@ -30,7 +30,14 @@ func runConfigDiff[I, S any](invocation commandkit.Invocation, plan *configOpera
|
||||
if err := invocation.Context.Err(); err != nil {
|
||||
return configFailure("Configuration comparison was canceled.", acquired.Explanation, err)
|
||||
}
|
||||
return renderPreparedConfigReport(invocation, acquired.Explanation, func() (any, error) {
|
||||
outcome := renderPreparedConfigReport(invocation, acquired.Explanation, func() (any, error) {
|
||||
if plan.details {
|
||||
return renderDetailedDiff(selected.scope.scope.Name, acquired.Value)
|
||||
}
|
||||
return renderDiffReport(acquired.Value)
|
||||
})
|
||||
if outcome.Kind == commandkit.OutcomeSuccess && plan.check && len(acquired.Value) > 0 {
|
||||
return commandkit.Domain("configuration differences", 3)
|
||||
}
|
||||
return outcome
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user