Skip to content

Commit a788911

Browse files
authored
auto: Expand test coverage (#1709)
This change contains an initial set of additional tests for automation API (ported from .NET). There's still more to come. A test found one bug where we weren't deserializing a couple JSON properties correctly, and a fix is included. Part of #1634
1 parent 33f0aa4 commit a788911

File tree

9 files changed

+777
-30
lines changed

9 files changed

+777
-30
lines changed

CHANGELOG_PENDING.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
### Bug Fixes
66

7+
- Fix bug deserializing `com.pulumi.automation.StackSummary`

sdk/java/pulumi/src/main/java/com/pulumi/automation/StackSummary.java

+4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44

55
import java.time.Instant;
66

7+
import com.google.gson.annotations.SerializedName;
8+
79
/**
810
* Information about a stack.
911
*/
1012
public class StackSummary {
1113
private final String name;
14+
@SerializedName("current")
1215
private final boolean isCurrent;
1316
private final Instant lastUpdate;
17+
@SerializedName("updateInProgress")
1418
private final boolean isUpdateInProgress;
1519
private final Integer resourceCount;
1620
private final String url;

sdk/java/pulumi/src/test/java/com/pulumi/automation/LocalWorkspaceTest.java

+752-30
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
description: This is a description
2+
name: correct_project
3+
runtime: java
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!Pulumi.dev.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
secretsprovider: abc
2+
config:
3+
plain: plain
4+
secure:
5+
secure: secret
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: testproj
2+
runtime: go
3+
description: A minimal Go Pulumi program
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
secretsprovider: abc
2+
config:
3+
plain: plain
4+
secure:
5+
secure: secret
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: testproj
2+
runtime: go
3+
description: A minimal Go Pulumi program

0 commit comments

Comments
 (0)