pulumi / pulumi-java

Java support for Pulumi
Apache License 2.0
69 stars 21 forks source link

Document unit testing in Java #1315

Open imavroukakis opened 7 months ago

imavroukakis commented 7 months ago

Hello!

Issue details

There doesn't seem to be any unit testing scaffolding support for the Java SDK. Compare and contrast that to the Python API with pulumi.runtime.Mocks , TypeScript with pulumi.runtime.setMocks and Go with pulumi.MockResourceArgs (and friends). Whilst integration testing is certainly possible, the feedback from the unit tests would be much faster

Affected area/feature

Unit testing

justinvp commented 7 months ago

@imavroukakis, see https://github.com/pulumi/pulumi-java/tree/main/tests/examples/testing-unit-java

imavroukakis commented 7 months ago

@imavroukakis, see https://github.com/pulumi/pulumi-java/tree/main/tests/examples/testing-unit-java

Wow thanks @justinvp ! I failed miserably to spot this - how come it's not in the documentation and are you going to make a fool out of me by posting an actual documentation link ? 😆

joeduffy commented 7 months ago

Agree with Ioannis here -- we should document this over here: https://www.pulumi.com/docs/using-pulumi/testing/unit/! Changed the title accordingly.