mirror of https://github.com/pulumi/pulumi.git
43a9bd7fe6
Automation API is useful for writing tests for Pulumi programs, and a user could write a test as follows: ```python def program(): with pytest.raises(ValueError): _a = 1 + 2 # No error here, pytest.raises should fail stack = create_stack("mystack", program=program, project_name="proj") with pytest.raises(InlineSourceRuntimeError): stack.preview() ``` If the block in `pytest.raises` does not raise the expected error or any error, `pytest.raises` fails the test by raising an `OutcomeException`. This exception class inherits from `BaseException`, not `Exception`, so we would previously not catch this, and fail to report an error from the automation API server's `Run` method, causing the call to `stack.preview` to hang indefinitely. Fixes https://github.com/pulumi/pulumi/issues/17133 |
||
---|---|---|
.. | ||
go | ||
nodejs | ||
proto/go | ||
python | ||
.version | ||
README.md | ||
go.mod | ||
go.sum | ||
version.go |