Skip to content

Commit 4ae1acc

Browse files
committed
Add resourcemanager project unit tests
Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent f86cc1b commit 4ae1acc

10 files changed

Lines changed: 4119 additions & 6 deletions

File tree

package-lock.json

Lines changed: 189 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"affinitygroup_unit_test": "file:tests/ts/iaas/affinityGroups",
13-
"image_unit_test": "file:tests/ts/iaas/image"
13+
"image_unit_test": "file:tests/ts/iaas/image",
14+
"project_unit_test": "file:tests/ts/resourcemanager/project"
1415
}
1516
}

tests/ts/iaas/affinityGroups/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/ts/iaas/image/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: project_unit_test
2+
description: A minimal TypeScript Pulumi program
3+
runtime:
4+
name: nodejs
5+
options:
6+
packagemanager: npm
7+
config:
8+
pulumi:tags:
9+
value:
10+
pulumi:template: typescript
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import * as pulumi from "@pulumi/pulumi";
2+
import * as stackit from "@stackitcloud/pulumi-stackit";
3+
4+
export const projectParentContainerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
5+
export const projectName = "example-project-name";
6+
export const projectOwnerEmail = "john.doe@stackit.cloud";
7+
8+
export const projectLabelKey = "unit-test";
9+
export const projectLabelValue = "test-label-value";
10+
11+
// datasource
12+
export const projectId = "project-id-to-read";
13+
14+
export const exampleProjectOnlyRequired = new stackit.ResourcemanagerProject("example_project_req", {
15+
parentContainerId: projectParentContainerId,
16+
name: projectName,
17+
labels: {[projectLabelKey]:projectLabelValue},
18+
ownerEmail: projectOwnerEmail,
19+
});
20+
21+
// datasource
22+
export const projectDatasource = stackit.getResourcemanagerProjectOutput({
23+
projectId: projectId,
24+
});

0 commit comments

Comments
 (0)