mirror of https://github.com/pulumi/pulumi.git
51a62a9265
In #17623 through #17627 and some follow-up PRs, we built out a framework for fuzzing lifecycle tests in order to help track down snapshot integrity violations in the Pulumi engine. All that remains now is to actually provide ways to trigger a fuzzing run in useful ways. This commit kicks this off by introducing two Go test functions that can be run with `go test` or our `Makefile`: * `TestFuzz` -- this runs the fuzzer and generates a brand new set of scenarios (1,000 by default) and checks whether any of them result in a snapshot integrity error. This test is skipped unless an environment variable is set (which the `Makefile` handles if one runs `make test_lifecycle_fuzz`). The intended purpose of this test is to back one or more CI workflows that will run periodically in order to slowly explore the state space. * `TestFuzzFromStateFile` -- this accepts a path to a JSON state file (such as that produced by a `pulumi stack export`) and uses that state to seed the fuzzer, subsequently trying to find provider and operation configurations that lead to a snapshot integrity error. This test is skipped unless a state file path is set using the relevant environment variable. The intended purpose of this test is to make it possible to find root causes for user issues when all we have is a state and we'd like to guess the program/provider configurations that led to an issue. Alongside introducing these two tests, we bulk out the fuzzing documentation a bit to help engineers run them, and link to the new sections from the existing docs on snapshot integrity issues. |
||
---|---|---|
.. | ||
lifecycletest | ||
combinedManager.go | ||
debugging.go | ||
deployment.go | ||
deployment_test.go | ||
destroy.go | ||
detailedDiff.go | ||
detailedDiff_test.go | ||
doc.go | ||
engine.go | ||
errors.go | ||
events.go | ||
events_test.go | ||
eventsink.go | ||
import.go | ||
journal.go | ||
plugin_host.go | ||
plugins.go | ||
plugins_test.go | ||
progress.go | ||
progress_test.go | ||
project.go | ||
query.go | ||
refresh.go | ||
snapshot.go | ||
update.go | ||
update_test.go |