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
// Custom state checks can be created by implementing the [statecheck.StateCheck] interface, or by using a StateCheck implementation from the provided [statecheck] package.
641
642
ConfigStateChecks []statecheck.StateCheck
642
643
644
+
// ConfigQueryChecks allow assertions to be made against the query file during a Config test using a query check.
645
+
// Custom query checks can be created by implementing the [querycheck.QueryCheck] interface, or by using a QueryCheck implementation from the provided [querycheck] package.
646
+
ConfigQueryChecks []querycheck.QueryCheck
647
+
643
648
// PlanOnly can be set to only run `plan` with this configuration, and not
644
649
// actually apply it. This is useful for ensuring config changes result in
645
650
// no-op plans
@@ -855,6 +860,21 @@ type ConfigPlanChecks struct {
855
860
PostApplyPostRefresh []plancheck.PlanCheck
856
861
}
857
862
863
+
// ConfigQueryChecks defines the different points in a Config TestStep when query checks can be run.
864
+
typeConfigQueryChecksstruct {
865
+
// PreApply runs all query checks in the slice. This occurs before the apply of a Config test is run. This slice cannot be populated
866
+
// 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.
867
+
PreApply []querycheck.QueryCheck
868
+
869
+
// PostApplyPreRefresh runs all query checks in the slice. This occurs after the apply and before the refresh of a Config test is run.
870
+
// All errors by query checks in this slice are aggregated, reported, and will result in a test failure.
871
+
PostApplyPreRefresh []querycheck.QueryCheck
872
+
873
+
// PostApplyPostRefresh runs all query checks in the slice. This occurs after the apply and refresh of a Config test are run.
874
+
// All errors by query checks in this slice are aggregated, reported, and will result in a test failure.
875
+
PostApplyPostRefresh []querycheck.QueryCheck
876
+
}
877
+
858
878
// ImportPlanChecks defines the different points in an Import TestStep when plan checks can be run.
859
879
typeImportPlanChecksstruct {
860
880
// PreApply runs all plan checks in the slice. This occurs after the plan of an Import test is computed. This slice cannot be populated
0 commit comments