Skip to content

Commit 98837c6

Browse files
authored
Add resourcemanager folder TypeScript unit tests (#108)
Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent b104f33 commit 98837c6

8 files changed

Lines changed: 4096 additions & 0 deletions

File tree

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
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+
"folder_unit_test": "file:tests/ts/resourcemanager/folder",
1314
"image_unit_test": "file:tests/ts/iaas/image",
1415
"key_pair_unit_test": "file:tests/ts/iaas/key-pair",
1516
"network_area_route_unit_test": "file:tests/ts/iaas/network-area-route",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: folder_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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import * as pulumi from "@pulumi/pulumi";
2+
import * as stackit from "@stackitcloud/pulumi-stackit";
3+
4+
export const folderContainerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
5+
export const folderName = "example-folder-name";
6+
export const folderOwnerEmail = "foo.bar@stackit.cloud";
7+
8+
export const folderLabelKey = "unit-test";
9+
export const folderLabelValue = "test-label-value";
10+
11+
// datasource
12+
export const folderId = "folder-id-to-read";
13+
14+
export const exampleFolder = new stackit.ResourcemanagerFolder("example_folder", {
15+
parentContainerId: folderContainerId,
16+
name: folderName,
17+
labels: {[folderLabelKey]:folderLabelValue},
18+
ownerEmail: folderOwnerEmail,
19+
});
20+
21+
export const folderDatasource = stackit.getResourcemanagerFolderOutput({
22+
containerId: folderId,
23+
});

0 commit comments

Comments
 (0)