File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -789,7 +789,10 @@ func TestWorkspaceBuildWithPreset(t *testing.T) {
789
789
// Inputs
790
790
withTemplate ,
791
791
withActiveVersion (nil ),
792
- withTemplateVersionPreset (presetID ),
792
+ // building workspaces using presets with different combinations of parameters
793
+ // is tested at the API layer, in TestWorkspace. Here, it is sufficient to
794
+ // test that the preset is used when provided.
795
+ withTemplateVersionPresetParameters (presetID , nil ),
793
796
withLastBuildNotFound ,
794
797
withTemplateVersionVariables (activeVersionID , nil ),
795
798
withParameterSchemas (activeJobID , nil ),
@@ -961,9 +964,9 @@ func withInactiveVersion(params []database.TemplateVersionParameter) func(mTx *d
961
964
}
962
965
}
963
966
964
- func withTemplateVersionPreset (presetID uuid.UUID ) func (mTx * dbmock.MockStore ) {
967
+ func withTemplateVersionPresetParameters (presetID uuid.UUID , params []database. TemplateVersionPresetParameter ) func (mTx * dbmock.MockStore ) {
965
968
return func (mTx * dbmock.MockStore ) {
966
- mTx .EXPECT ().GetPresetParametersByPresetID (gomock .Any (), presetID ).Return (nil , nil )
969
+ mTx .EXPECT ().GetPresetParametersByPresetID (gomock .Any (), presetID ).Return (params , nil )
967
970
}
968
971
}
969
972
You can’t perform that action at this time.
0 commit comments