mirror of https://github.com/pulumi/pulumi.git
26ae5768a8
Lifecycle tests exist to test the Pulumi engine, allowing us to mock providers and programs and resource registrations before executing specific operations. We'd like to extend our lifecycle test suite to support fuzzing the engine -- that is, generating test cases to exercise edge cases that we might otherwise struggle to find manually. Presently, the framework underpinning the lifecycle tests is defined in a single `test_plan.go` module that sits alongside the `_test.go` files themselves. This means that it's not really possible to factor out or neatly extend the framework (e.g. by adding a `fuzzing` submodule) without introducing circular imports (since tests in `lifecycletest` will import `fuzzing`, which imports the framework from `lifecycletest`). This commit therefore pulls out `test_plan.go` into a dedicated `framework` submodule, which is now explicitly imported and used by existing tests. It also adapts the framework slightly to define the subset of `testing.T` functionality it needs more precisely, so that when the time comes for us to fuzz we can e.g. pass a `rapid.T` just as easily. No behavioural changes are made to the tests themselves -- this is purely a structural change to facilitate subsequent work on fuzzing. |
||
---|---|---|
.. | ||
framework.go |