-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unskip the
l2-resource-parent-inheritance
test (#1554)
This test is passing so no need to skip it.
- Loading branch information
Showing
4 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
pkg/cmd/pulumi-language-java/testdata/projects/l2-resource-parent-inheritance/Pulumi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: l2-resource-parent-inheritance | ||
runtime: java |
99 changes: 99 additions & 0 deletions
99
pkg/cmd/pulumi-language-java/testdata/projects/l2-resource-parent-inheritance/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.pulumi</groupId> | ||
<artifactId>l2-resource-parent-inheritance</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<encoding>UTF-8</encoding> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<maven.compiler.release>11</maven.compiler.release> | ||
<mainClass>generated_program.App</mainClass> | ||
<mainArgs/> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>repository-0</id> | ||
<url>REPOSITORY</url> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.pulumi</groupId> | ||
<artifactId>pulumi</artifactId> | ||
<version>CORE.VERSION</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.pulumi</groupId> | ||
<artifactId>simple</artifactId> | ||
<version>2.0.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.2.2</version> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>${mainClass}</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>3.4.2</version> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>${mainClass}</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-my-jar-with-dependencies</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<configuration> | ||
<mainClass>${mainClass}</mainClass> | ||
<commandlineArgs>${mainArgs}</commandlineArgs> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-wrapper-plugin</artifactId> | ||
<version>3.1.1</version> | ||
<configuration> | ||
<mavenVersion>3.8.5</mavenVersion> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
58 changes: 58 additions & 0 deletions
58
...testdata/projects/l2-resource-parent-inheritance/src/main/java/generated_program/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package generated_program; | ||
|
||
import com.pulumi.Context; | ||
import com.pulumi.Pulumi; | ||
import com.pulumi.core.Output; | ||
import com.pulumi.simple.Provider; | ||
import com.pulumi.simple.Resource; | ||
import com.pulumi.simple.ResourceArgs; | ||
import com.pulumi.resources.CustomResourceOptions; | ||
import java.util.List; | ||
import java.util.ArrayList; | ||
import java.util.Map; | ||
import java.io.File; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
|
||
public class App { | ||
public static void main(String[] args) { | ||
Pulumi.run(App::stack); | ||
} | ||
|
||
public static void stack(Context ctx) { | ||
var provider = new Provider("provider"); | ||
|
||
var parent1 = new Resource("parent1", ResourceArgs.builder() | ||
.value(true) | ||
.build(), CustomResourceOptions.builder() | ||
.provider(provider) | ||
.build()); | ||
|
||
var child1 = new Resource("child1", ResourceArgs.builder() | ||
.value(true) | ||
.build(), CustomResourceOptions.builder() | ||
.parent(parent1) | ||
.build()); | ||
|
||
var orphan1 = new Resource("orphan1", ResourceArgs.builder() | ||
.value(true) | ||
.build()); | ||
|
||
var parent2 = new Resource("parent2", ResourceArgs.builder() | ||
.value(true) | ||
.build(), CustomResourceOptions.builder() | ||
.protect(true) | ||
.build()); | ||
|
||
var child2 = new Resource("child2", ResourceArgs.builder() | ||
.value(true) | ||
.build(), CustomResourceOptions.builder() | ||
.parent(parent2) | ||
.build()); | ||
|
||
var orphan2 = new Resource("orphan2", ResourceArgs.builder() | ||
.value(true) | ||
.build()); | ||
|
||
} | ||
} |