Skip to content

Commit 0053f1f

Browse files
committed
fix(plugin): improve config and add extra tests
1 parent 3fae854 commit 0053f1f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

internal/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ func (c *ProjectConfig) extendConfig(o *ProjectConfig) *ProjectConfig {
5555
cfg := &ProjectConfig{
5656
ManualProductionDeployment: o.ManualProductionDeployment,
5757
EnvironmentVariables: o.EnvironmentVariables,
58+
GitRepository: o.GitRepository,
5859
}
5960

6061
if c.Name != o.Name {

internal/plugin_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func TestSiteComponentInheritance(t *testing.T) {
149149
"team_id": "test-team-override",
150150
"api_token": "test-token-override",
151151
"project_config": map[string]any{
152+
"serverless_function_region": "iad1",
152153
"manual_production_deployment": false,
153154
"environment_variables": siteVariables,
154155
},
@@ -165,7 +166,9 @@ func TestSiteComponentInheritance(t *testing.T) {
165166

166167
componentData := map[string]any{
167168
"project_config": map[string]any{
168-
"environment_variables": componentVariables,
169+
"serverless_function_region": "fra1",
170+
"manual_production_deployment": true,
171+
"environment_variables": componentVariables,
169172
},
170173
}
171174

@@ -180,6 +183,8 @@ func TestSiteComponentInheritance(t *testing.T) {
180183
require.NoError(t, err)
181184

182185
// Test whether environment variables get extended
186+
assert.Contains(t, component.Variables, "serverless_function_region = \"fra1\"")
187+
assert.Contains(t, component.Variables, "manual_production_deployment = true")
183188
assert.Contains(t, component.Variables, "key = \"TEST_ENVIRONMENT_VARIABLE_2\"")
184189
assert.Contains(t, component.Variables, "key = \"TEST_ENVIRONMENT_VARIABLE_3\"")
185190

0 commit comments

Comments
 (0)