File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -789,6 +789,7 @@ func TestWorkspaceBuildWithPreset(t *testing.T) {
789
789
// Inputs
790
790
withTemplate ,
791
791
withActiveVersion (nil ),
792
+ withTemplateVersionPreset (presetID ),
792
793
withLastBuildNotFound ,
793
794
withTemplateVersionVariables (activeVersionID , nil ),
794
795
withParameterSchemas (activeJobID , nil ),
@@ -960,6 +961,12 @@ func withInactiveVersion(params []database.TemplateVersionParameter) func(mTx *d
960
961
}
961
962
}
962
963
964
+ func withTemplateVersionPreset (presetID uuid.UUID ) func (mTx * dbmock.MockStore ) {
965
+ return func (mTx * dbmock.MockStore ) {
966
+ mTx .EXPECT ().GetPresetParametersByPresetID (gomock .Any (), presetID ).Return (nil , nil )
967
+ }
968
+ }
969
+
963
970
func withLastBuildFound (mTx * dbmock.MockStore ) {
964
971
mTx .EXPECT ().GetLatestWorkspaceBuildByWorkspaceID (gomock .Any (), workspaceID ).
965
972
Times (1 ).
You can’t perform that action at this time.
0 commit comments