11package internal
22
33import (
4+ "fmt"
45 "testing"
56
67 "github.com/stretchr/testify/assert"
@@ -194,6 +195,11 @@ func TestSiteComponentInheritance(t *testing.T) {
194195 "serverless_function_region" : "iad1" ,
195196 "manual_production_deployment" : false ,
196197 "environment_variables" : siteVariables ,
198+ "git_repository" : map [string ]any {
199+ "production_branch" : "main" ,
200+ "type" : "github" ,
201+ "repo" : "mach-composer/my-project" ,
202+ },
197203 },
198204 }
199205
@@ -211,6 +217,9 @@ func TestSiteComponentInheritance(t *testing.T) {
211217 "serverless_function_region" : "fra1" ,
212218 "manual_production_deployment" : true ,
213219 "environment_variables" : componentVariables ,
220+ "git_repository" : map [string ]any {
221+ "production_branch" : "production" ,
222+ },
214223 },
215224 }
216225
@@ -229,6 +238,7 @@ func TestSiteComponentInheritance(t *testing.T) {
229238 assert .Contains (t , component .Variables , "vercel_project_manual_production_deployment = true" )
230239 assert .Contains (t , component .Variables , "key = \" TEST_ENVIRONMENT_VARIABLE_2\" " )
231240 assert .Contains (t , component .Variables , "key = \" TEST_ENVIRONMENT_VARIABLE_3\" " )
241+ assert .Contains (t , component .Variables , "production_branch = \" production\" " )
232242
233243}
234244
@@ -321,6 +331,8 @@ func TestCompleteInheritance(t *testing.T) {
321331
322332 component , err := plugin .RenderTerraformComponent ("my-site" , "test-component" )
323333
334+ fmt .Println (component )
335+
324336 assert .Contains (t , component .Variables , "vercel_project_serverless_function_region = \" fra1\" " )
325337 assert .Contains (t , component .Variables , "type = \" github\" " )
326338 assert .Contains (t , component .Variables , "production_branch = \" production\" " )
0 commit comments