Skip to content

Commit

Permalink
Add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Aug 14, 2024
1 parent d0efb32 commit 32f875b
Show file tree
Hide file tree
Showing 11 changed files with 691 additions and 17 deletions.
41 changes: 41 additions & 0 deletions pf/tfgen/testdata/TestTypeOverride/attr-list-element.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1s": {
"type": "array",
"items": {
"type": "number"
}
}
},
"inputProperties": {
"a1s": {
"type": "array",
"items": {
"type": "number"
}
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1s": {
"type": "array",
"items": {
"type": "number"
}
}
},
"type": "object"
}
}
}
}
32 changes: 32 additions & 0 deletions pf/tfgen/testdata/TestTypeOverride/attr-list-max-items-one.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1": {
"type": "string"
}
},
"inputProperties": {
"a1": {
"type": "string"
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1": {
"type": "string"
}
},
"type": "object"
}
}
}
}
41 changes: 41 additions & 0 deletions pf/tfgen/testdata/TestTypeOverride/attr-map-element.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
},
"inputProperties": {
"a1": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
},
"type": "object"
}
}
}
}
51 changes: 51 additions & 0 deletions pf/tfgen/testdata/TestTypeOverride/attr-map-object-element.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"types": {
"testprovider:index/ResA1:ResA1": {
"properties": {
"n1": {
"type": "number"
}
},
"type": "object"
}
},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1": {
"type": "object",
"additionalProperties": {
"$ref": "#/types/testprovider:index/ResA1:ResA1"
}
}
},
"inputProperties": {
"a1": {
"type": "object",
"additionalProperties": {
"$ref": "#/types/testprovider:index/ResA1:ResA1"
}
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1": {
"type": "object",
"additionalProperties": {
"$ref": "#/types/testprovider:index/ResA1:ResA1"
}
}
},
"type": "object"
}
}
}
}
41 changes: 41 additions & 0 deletions pf/tfgen/testdata/TestTypeOverride/attr-set-element.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1s": {
"type": "array",
"items": {
"type": "number"
}
}
},
"inputProperties": {
"a1s": {
"type": "array",
"items": {
"type": "number"
}
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1s": {
"type": "array",
"items": {
"type": "number"
}
}
},
"type": "object"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"types": {
"testprovider:index/ResA1:ResA1": {
"properties": {
"n1": {
"type": "number"
}
},
"type": "object"
}
},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1": {
"$ref": "#/types/testprovider:index/ResA1:ResA1"
}
},
"inputProperties": {
"a1": {
"$ref": "#/types/testprovider:index/ResA1:ResA1"
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1": {
"$ref": "#/types/testprovider:index/ResA1:ResA1"
}
},
"type": "object"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"types": {
"testprovider:index/ResA1:ResA1": {
"properties": {
"n1": {
"type": "string"
}
},
"type": "object"
}
},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1": {
"$ref": "#/types/testprovider:index:SomeOtherType"
}
},
"inputProperties": {
"a1": {
"$ref": "#/types/testprovider:index:SomeOtherType"
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1": {
"$ref": "#/types/testprovider:index:SomeOtherType"
}
},
"type": "object"
}
}
}
}
51 changes: 51 additions & 0 deletions pf/tfgen/testdata/TestTypeOverride/no-override.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "testprovider",
"attribution": "This Pulumi package is based on the [`testprovider` Terraform Provider](https://github.com/terraform-providers/terraform-provider-testprovider).",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
"config": {},
"types": {
"testprovider:index/ResB1:ResB1": {
"properties": {
"a1": {
"type": "string"
}
},
"type": "object"
}
},
"provider": {},
"resources": {
"testprovider:index:Res": {
"properties": {
"a1": {
"type": "string"
},
"b1": {
"$ref": "#/types/testprovider:index/ResB1:ResB1"
}
},
"inputProperties": {
"a1": {
"type": "string"
},
"b1": {
"$ref": "#/types/testprovider:index/ResB1:ResB1"
}
},
"stateInputs": {
"description": "Input properties used for looking up and filtering Res resources.\n",
"properties": {
"a1": {
"type": "string"
},
"b1": {
"$ref": "#/types/testprovider:index/ResB1:ResB1"
}
},
"type": "object"
}
}
}
}
Loading

0 comments on commit 32f875b

Please sign in to comment.