pulumi/pkg/engine
Will Jones 51a62a9265
Add Go tests for fuzzing the engine (#17717)
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.
2024-11-08 13:11:03 +00:00
..
lifecycletest Add Go tests for fuzzing the engine (#17717) 2024-11-08 13:11:03 +00:00
combinedManager.go Test SnapshotManager and Journal in engine tests (#15871) 2024-04-11 22:54:08 +00:00
debugging.go implement the engine bits for debugging support (#17072) 2024-08-30 10:31:28 +00:00
deployment.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
deployment_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
destroy.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
detailedDiff.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
detailedDiff_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
engine.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
errors.go Centralise human-friendly error handling in the CLI (#17046) 2024-08-23 08:48:42 +00:00
events.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
events_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
eventsink.go turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
import.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
journal.go Introduce snapshot metadata (#17430) 2024-09-30 16:45:40 +00:00
plugin_host.go Bump gRPC dependencies and migrate `grpc.Dial` (#17701) 2024-11-06 18:36:10 +00:00
plugins.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
plugins_test.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
progress.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
progress_test.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
project.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
query.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
refresh.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
snapshot.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
update.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
update_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00