@@ -5,7 +5,6 @@ package cloud_test
55
66import (
77 "encoding/json"
8- "fmt"
98 "net/http"
109 "os"
1110 "path/filepath"
@@ -72,22 +71,20 @@ func TestScriptRunWithCloudSyncPreview(t *testing.T) {
7271 }
7372 }
7473 ` ,
75- fmt . Sprintf ( `f:stack/preview.tm:
74+ `f:stack/preview.tm:
7675
7776 script "preview" {
7877 description = "sync a preview"
7978 job {
8079 commands = [
81- ["%s ", "plan", "-out=out.tfplan", "-no-color", "-detailed-exitcode", {
80+ ["terraform ", "plan", "-out=out.tfplan", "-no-color", "-detailed-exitcode", {
8281 sync_preview = true,
8382 terraform_plan_file = "out.tfplan",
8483 }],
8584 ]
8685 }
8786 }
8887 ` ,
89- TerraformTestPath ,
90- ),
9188 `f:stack/main.tf:
9289 resource "local_file" "foo" {
9390 content = "test content"
@@ -129,22 +126,20 @@ func TestScriptRunWithCloudSyncPreview(t *testing.T) {
129126 }
130127 }
131128 ` ,
132- fmt . Sprintf ( `f:stack/preview.tm:
129+ `f:stack/preview.tm:
133130
134131 script "preview" {
135132 description = "sync a preview"
136133 job {
137134 commands = [
138- ["%s ", "plan", "-out=out.tfplan", "-no-color", "-detailed-exitcode", {
135+ ["terraform ", "plan", "-out=out.tfplan", "-no-color", "-detailed-exitcode", {
139136 sync_preview = true,
140137 terraform_plan_file = "out.tfplan",
141138 }],
142139 ]
143140 }
144141 }
145142 ` ,
146- TerraformTestPath ,
147- ),
148143 `f:stack/main.tf:
149144 resource "local_file" "foo" {
150145 content = "test content"
@@ -177,7 +172,7 @@ func TestScriptRunWithCloudSyncPreview(t *testing.T) {
177172 {
178173 ID : "1" ,
179174 Status : "changed" ,
180- Cmd : []string {TerraformTestPath , "plan" , "-out=out.tfplan" , "-no-color" , "-detailed-exitcode" },
175+ Cmd : []string {"terraform" , "plan" , "-out=out.tfplan" , "-no-color" , "-detailed-exitcode" },
181176 },
182177 },
183178 ReviewRequest : & cloud.ReviewRequest {
@@ -239,23 +234,21 @@ func TestScriptRunWithCloudSyncPreview(t *testing.T) {
239234 }
240235 }
241236 ` ,
242- fmt . Sprintf ( `f:stack/preview.tm:
237+ `f:stack/preview.tm:
243238
244239 script "preview" {
245240 description = "sync a preview"
246241 job {
247242 commands = [
248243 ["do-not-exist-command"],
249- ["%s ", "plan", "-out=out.tfplan", "-no-color", "-detailed-exitcode", {
244+ ["terraform ", "plan", "-out=out.tfplan", "-no-color", "-detailed-exitcode", {
250245 sync_preview = true,
251246 terraform_plan_file = "out.tfplan",
252247 }],
253248 ]
254249 }
255250 }
256251 ` ,
257- TerraformTestPath ,
258- ),
259252 `f:stack/main.tf:
260253 resource "local_file" "foo" {
261254 content = "test content"
@@ -285,7 +278,7 @@ func TestScriptRunWithCloudSyncPreview(t *testing.T) {
285278 {
286279 ID : "1" ,
287280 Status : "failed" ,
288- Cmd : []string {TerraformTestPath , "plan" , "-out=out.tfplan" , "-no-color" , "-detailed-exitcode" },
281+ Cmd : []string {"terraform" , "plan" , "-out=out.tfplan" , "-no-color" , "-detailed-exitcode" },
289282 },
290283 },
291284 ReviewRequest : & cloud.ReviewRequest {
0 commit comments