mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
[testing framework] implement expect_failures functionality (#33443)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/terraform/internal/addrs"
|
||||
"github.com/hashicorp/terraform/internal/backend"
|
||||
"github.com/hashicorp/terraform/internal/command/views"
|
||||
"github.com/hashicorp/terraform/internal/logging"
|
||||
@@ -198,9 +199,10 @@ func (b *Local) opApply(
|
||||
// is needlessly confusing.
|
||||
var filteredDiags tfdiags.Diagnostics
|
||||
for _, diag := range diags {
|
||||
if !tfdiags.IsFromCheckBlock(diag) {
|
||||
filteredDiags = filteredDiags.Append(diag)
|
||||
if rule, ok := addrs.DiagnosticOriginatesFromCheckRule(diag); ok && rule.Container.CheckableKind() == addrs.CheckableCheck {
|
||||
continue
|
||||
}
|
||||
filteredDiags = filteredDiags.Append(diag)
|
||||
}
|
||||
diags = filteredDiags
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user