@@ -57,7 +57,6 @@ func TestBuilder_NoOptions(t *testing.T) {
57
57
mDB := expectDB (t ,
58
58
// Inputs
59
59
withTemplate ,
60
- withTerraformValuesErrNoRows ,
61
60
withInactiveVersion (nil ),
62
61
withLastBuildFound ,
63
62
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -114,7 +113,6 @@ func TestBuilder_Initiator(t *testing.T) {
114
113
mDB := expectDB (t ,
115
114
// Inputs
116
115
withTemplate ,
117
- withTerraformValuesErrNoRows ,
118
116
withInactiveVersion (nil ),
119
117
withLastBuildFound ,
120
118
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -161,7 +159,6 @@ func TestBuilder_Baggage(t *testing.T) {
161
159
mDB := expectDB (t ,
162
160
// Inputs
163
161
withTemplate ,
164
- withTerraformValuesErrNoRows ,
165
162
withInactiveVersion (nil ),
166
163
withLastBuildFound ,
167
164
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -200,7 +197,6 @@ func TestBuilder_Reason(t *testing.T) {
200
197
mDB := expectDB (t ,
201
198
// Inputs
202
199
withTemplate ,
203
- withTerraformValuesErrNoRows ,
204
200
withInactiveVersion (nil ),
205
201
withLastBuildFound ,
206
202
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -239,7 +235,6 @@ func TestBuilder_ActiveVersion(t *testing.T) {
239
235
mDB := expectDB (t ,
240
236
// Inputs
241
237
withTemplate ,
242
- withTerraformValuesErrNoRows ,
243
238
withActiveVersion (nil ),
244
239
withLastBuildNotFound ,
245
240
withTemplateVersionVariables (activeVersionID ,nil ),
@@ -343,7 +338,6 @@ func TestWorkspaceBuildWithTags(t *testing.T) {
343
338
mDB := expectDB (t ,
344
339
// Inputs
345
340
withTemplate ,
346
- withTerraformValuesErrNoRows ,
347
341
withInactiveVersion (richParameters ),
348
342
withLastBuildFound ,
349
343
withTemplateVersionVariables (inactiveVersionID ,templateVersionVariables ),
@@ -439,7 +433,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
439
433
mDB := expectDB (t ,
440
434
// Inputs
441
435
withTemplate ,
442
- withTerraformValuesErrNoRows ,
443
436
withInactiveVersion (richParameters ),
444
437
withLastBuildFound ,
445
438
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -487,7 +480,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
487
480
mDB := expectDB (t ,
488
481
// Inputs
489
482
withTemplate ,
490
- withTerraformValuesErrNoRows ,
491
483
withInactiveVersion (richParameters ),
492
484
withLastBuildFound ,
493
485
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -541,7 +533,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
541
533
mDB := expectDB (t ,
542
534
// Inputs
543
535
withTemplate ,
544
- withTerraformValuesErrNoRows ,
545
536
withInactiveVersion (richParameters ),
546
537
withLastBuildFound ,
547
538
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -574,7 +565,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
574
565
mDB := expectDB (t ,
575
566
// Inputs
576
567
withTemplate ,
577
- withTerraformValuesErrNoRows ,
578
568
withInactiveVersion (richParameters ),
579
569
withLastBuildFound ,
580
570
withTemplateVersionVariables (inactiveVersionID ,nil ),
@@ -627,7 +617,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
627
617
mDB := expectDB (t ,
628
618
// Inputs
629
619
withTemplate ,
630
- withTerraformValuesErrNoRows ,
631
620
withActiveVersion (version2params ),
632
621
withLastBuildFound ,
633
622
withTemplateVersionVariables (activeVersionID ,nil ),
@@ -691,7 +680,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
691
680
mDB := expectDB (t ,
692
681
// Inputs
693
682
withTemplate ,
694
- withTerraformValuesErrNoRows ,
695
683
withActiveVersion (version2params ),
696
684
withLastBuildFound ,
697
685
withTemplateVersionVariables (activeVersionID ,nil ),
@@ -753,7 +741,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) {
753
741
mDB := expectDB (t ,
754
742
// Inputs
755
743
withTemplate ,
756
- withTerraformValuesErrNoRows ,
757
744
withActiveVersion (version2params ),
758
745
withLastBuildFound ,
759
746
withTemplateVersionVariables (activeVersionID ,nil ),
@@ -801,7 +788,6 @@ func TestWorkspaceBuildWithPreset(t *testing.T) {
801
788
mDB := expectDB (t ,
802
789
// Inputs
803
790
withTemplate ,
804
- withTerraformValuesErrNoRows ,
805
791
withActiveVersion (nil ),
806
792
// building workspaces using presets with different combinations of parameters
807
793
// is tested at the API layer, in TestWorkspace. Here, it is sufficient to
@@ -916,12 +902,6 @@ func withTemplate(mTx *dbmock.MockStore) {
916
902
},nil )
917
903
}
918
904
919
- func withTerraformValuesErrNoRows (mTx * dbmock.MockStore ) {
920
- mTx .EXPECT ().GetTemplateVersionTerraformValues (gomock .Any (),gomock .Any ()).
921
- Times (1 ).
922
- Return (database.TemplateVersionTerraformValue {},sql .ErrNoRows )
923
- }
924
-
925
905
// withInTx runs the given functions on the same db mock.
926
906
func withInTx (mTx * dbmock.MockStore ) {
927
907
mTx .EXPECT ().InTx (gomock .Any (),gomock .Any ()).Times (1 ).DoAndReturn (