Skip to content

Commit 20d0db2

Browse files
committed
fix(plugin): just use redirect status code for now
1 parent 1d155b5 commit 20d0db2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

internal/plugin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ func (p *VercelPlugin) RenderTerraformComponent(site string, component string) (
199199
vercel_project_domains = [{{range .ProjectConfig.ProjectDomains }}
200200
{
201201
{{ renderProperty "domain" .Domain }}
202+
{{ renderProperty "redirect_status_code" .RedirectStatusCode }}
202203
},{{end}}
203204
]
204205
`

internal/plugin_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestSetVercelConfig(t *testing.T) {
1818
}
1919

2020
projectDomains := []ProjectDomain{
21-
{Domain: "test-domain.com", GitBranch: "main", Redirect: "other-domain.com", RedirectStatusCode: 307},
21+
{Domain: "test-domain.com", RedirectStatusCode: 307},
2222
}
2323

2424
domains := make([]interface{}, len(projectDomains))
@@ -85,8 +85,6 @@ func TestSetVercelConfig(t *testing.T) {
8585

8686
// Test domains
8787
assert.Contains(t, component.Variables, "domain = \"test-domain.com\"")
88-
assert.Contains(t, component.Variables, "git_branch = \"main\"")
89-
assert.Contains(t, component.Variables, "redirect = \"other-domain.com\"")
9088
assert.Contains(t, component.Variables, "redirect_status_code = 307")
9189

9290
}

0 commit comments

Comments
 (0)