You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: helper/resource/testing.go
+2-17Lines changed: 2 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -642,9 +642,9 @@ type TestStep struct {
642
642
// Custom state checks can be created by implementing the [statecheck.StateCheck] interface, or by using a StateCheck implementation from the provided [statecheck] package.
643
643
ConfigStateChecks []statecheck.StateCheck
644
644
645
-
// ConfigQueryResultChecks allow assertions to be made against the query file during a Config test using a query check.
645
+
// QueryResultChecks allow assertions to be made against a collection of found resources that were returned by a query using a query check.
646
646
// Custom query checks can be created by implementing the [querycheck.QueryResultCheck] interface, or by using a QueryResultCheck implementation from the provided [querycheck] package.
// PlanOnly can be set to only run `plan` with this configuration, and not
650
650
// actually apply it. This is useful for ensuring config changes result in
@@ -861,21 +861,6 @@ type ConfigPlanChecks struct {
861
861
PostApplyPostRefresh []plancheck.PlanCheck
862
862
}
863
863
864
-
// ConfigQueryChecks defines the different points in a Config TestStep when query checks can be run.
865
-
typeConfigQueryChecksstruct {
866
-
// PreApply runs all query checks in the slice. This occurs before the apply of a Config test is run. This slice cannot be populated
867
-
// with TestStep.QueryOnly, as there is no PreApply query run with that flag set. All errors by query checks in this slice are aggregated, reported, and will result in a test failure.
868
-
PreApply []querycheck.QueryResultCheck
869
-
870
-
// PostApplyPreRefresh runs all query checks in the slice. This occurs after the apply and before the refresh of a Config test is run.
871
-
// All errors by query checks in this slice are aggregated, reported, and will result in a test failure.
872
-
PostApplyPreRefresh []querycheck.QueryResultCheck
873
-
874
-
// PostApplyPostRefresh runs all query checks in the slice. This occurs after the apply and refresh of a Config test are run.
875
-
// All errors by query checks in this slice are aggregated, reported, and will result in a test failure.
// Contains returns a query check that asserts that a resource with a given display name exists within the returned results of the query.
30
+
// ContainsResourceWithName returns a query check that asserts that a resource with a given display name exists within the returned results of the query.
31
31
//
32
32
// This query check can only be used with managed resources that support query. Query is only supported in Terraform v1.14+
0 commit comments