Package com.pulumi.test
Interface PulumiTest
- All Known Implementing Classes:
PulumiTestInternal
public interface PulumiTest
Provides a test Pulumi runner and exposes various internals for the testing purposes.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacePulumi test entrypoint operations. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic voidcleanup()Cleanup internal test state.static <T> TextractValue(Output<T> output) Extract the value from anOutputblocking.static <T> CompletableFuture<T>extractValueAsync(Output<T> output) Extract the future value from anOutputasynchronously.static TestResultRun a Pulumi test stack callback, wait for result and returnTestResult.static CompletableFuture<TestResult>runTestAsync(Consumer<Context> stack) Run a Pulumi test stack callback asynchronously and returnTestResult.static PulumiTest.APIUseMocksin this test.static PulumiTest.APIwithOptions(TestOptions options) UseTestOptionsin this test.
-
Method Details
-
runTest
Run a Pulumi test stack callback, wait for result and returnTestResult.- Parameters:
stack- the stack to run in Pulumi test runtime- Returns:
- a
TestResultfrom Pulumi test runtime after running the stack - See Also:
-
runTestAsync
Run a Pulumi test stack callback asynchronously and returnTestResult.- Parameters:
stack- the stack to run in Pulumi test runtime- Returns:
- a future
TestResultfrom Pulumi test runtime after running the stack - See Also:
-
withOptions
UseTestOptionsin this test.- Parameters:
options- theTestOptionsto use- Returns:
- a Pulumi test program entrypoint with given
TestOptions - See Also:
-
withMocks
UseMocksin this test.- Parameters:
mocks- theMonitormocks to use- Returns:
- a Pulumi test program entrypoint with given
TestOptions - See Also:
-
cleanup
static void cleanup()Cleanup internal test state. Must be called after every run of a Pulumi test program. -
extractValue
Extract the value from anOutputblocking. -
extractValueAsync
Extract the future value from anOutputasynchronously.
-