@@ -52,11 +52,11 @@ func TestSetVercelConfig(t *testing.T) {
5252 "domains" : domains ,
5353 "protection_bypass_for_automation" : true ,
5454 "vercel_authentication" : map [string ]any {
55- "protect_production " : true ,
55+ "deployment_type " : "only_preview_deployments" ,
5656 },
5757 "password_protection" : map [string ]any {
58- "password" : "MyPassword" ,
59- "protect_production " : true ,
58+ "password" : "MyPassword" ,
59+ "deployment_type " : "only_preview_deployments" ,
6060 },
6161 },
6262 }
@@ -89,7 +89,7 @@ func TestSetVercelConfig(t *testing.T) {
8989 assert .Contains (t , component .Variables , "type = \" github\" " )
9090 assert .Contains (t , component .Variables , "repo = \" mach-composer/my-project\" " )
9191 assert .Contains (t , component .Variables , "protection_bypass_for_automation = true" )
92- assert .Contains (t , component .Variables , "protect_production = true " )
92+ assert .Contains (t , component .Variables , "deployment_type = \" only_preview_deployments \" " )
9393 assert .Contains (t , component .Variables , "password = \" MyPassword\" " )
9494
9595 // Test environment variables
@@ -121,11 +121,11 @@ func TestInheritance(t *testing.T) {
121121 "manual_production_deployment" : true ,
122122 "protection_bypass_for_automation" : true ,
123123 "vercel_authentication" : map [string ]any {
124- "protect_production " : true ,
124+ "deployment_type " : "standard_protection" ,
125125 },
126126 "password_protection" : map [string ]any {
127- "password" : "MyPassword" ,
128- "protect_production " : true ,
127+ "password" : "MyPassword" ,
128+ "deployment_type " : "standard_protection" ,
129129 },
130130 "environment_variables" : globalVariables ,
131131 },
@@ -145,10 +145,11 @@ func TestInheritance(t *testing.T) {
145145 "api_token" : "test-token-override" ,
146146 "project_config" : map [string ]any {
147147 "vercel_authentication" : map [string ]any {
148- "protect_production " : false ,
148+ "deployment_type " : "standard_protection" ,
149149 },
150150 "password_protection" : map [string ]any {
151- "protect_production" : false ,
151+ "password" : "MyPassword" ,
152+ "deployment_type" : "standard_protection" ,
152153 },
153154 "environment_variables" : siteVariables ,
154155 },
@@ -175,7 +176,7 @@ func TestInheritance(t *testing.T) {
175176 // Test whether environment variables get extended
176177 assert .Contains (t , component .Variables , "environment = [\" development\" , \" preview\" , \" production\" ]" )
177178 assert .Contains (t , component .Variables , "environment = [\" production\" , \" preview\" ]" )
178- assert .Contains (t , component .Variables , "protect_production = false " )
179+ assert .Contains (t , component .Variables , "deployment_type = \" standard_protection \" " )
179180
180181 assert .Contains (t , component .Variables , "environment" )
181182}
0 commit comments