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 |
||
---|---|---|
.. | ||
automation | ||
data/lazy_import_test | ||
dynamic | ||
langhost | ||
provider | ||
runtime | ||
__init__.py | ||
conftest.py | ||
helpers.py | ||
test_broken_dynamic_provider.py | ||
test_config.py | ||
test_deprecated.py | ||
test_invoke.py | ||
test_monitor_termination.py | ||
test_next_serialize.py | ||
test_output.py | ||
test_resource.py | ||
test_runtime_to_json.py | ||
test_stack_reference.py | ||
test_stack_registers_outputs.py | ||
test_translate_output_properties.py | ||
test_types_input_type.py | ||
test_types_input_type_types.py | ||
test_types_output_type.py | ||
test_types_resource_types.py | ||
test_urn.py | ||
test_utils.py |