test(cmd): the base-engine setting turns on the ensemble, and nothing else does (red)
Red: buildTranscriber is undefined. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
"git.d-ma.be/mathias/tapir/internal/adapters/transcribe"
|
||||||
"git.d-ma.be/mathias/tapir/internal/config"
|
"git.d-ma.be/mathias/tapir/internal/config"
|
||||||
"git.d-ma.be/mathias/tapir/internal/domain"
|
"git.d-ma.be/mathias/tapir/internal/domain"
|
||||||
"git.d-ma.be/mathias/tapir/internal/web"
|
"git.d-ma.be/mathias/tapir/internal/web"
|
||||||
@@ -154,3 +155,33 @@ func TestWireUploads_NilIntakeLeavesTheAppUntouched(t *testing.T) {
|
|||||||
assert.Nil(t, app.Uploads, "a nil *Intake must not become a non-nil interface that mounts the routes")
|
assert.Nil(t, app.Uploads, "a nil *Intake must not become a non-nil interface that mounts the routes")
|
||||||
assert.Zero(t, app.UploadChatMaxChars)
|
assert.Zero(t, app.UploadChatMaxChars)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestBuildTranscriber_DefaultIsTheSingleEngineChainAsBefore(t *testing.T) {
|
||||||
|
cfg := uploadCfg(t, true)
|
||||||
|
|
||||||
|
tr := buildTranscriber(cfg)
|
||||||
|
|
||||||
|
assert.IsType(t, &transcribe.Chain{}, tr, "with no base engine configured nothing changes")
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBuildTranscriber_ABaseEngineTurnsOnTheEnsemble(t *testing.T) {
|
||||||
|
cfg := uploadCfg(t, true)
|
||||||
|
cfg.ReconcileBaseModel = "iguana/pianissimo"
|
||||||
|
cfg.ReconcileModel = "iguana/gemma4-26b"
|
||||||
|
|
||||||
|
tr := buildTranscriber(cfg)
|
||||||
|
|
||||||
|
assert.IsType(t, &transcribe.Ensemble{}, tr)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBuildUploads_WiresTheEnsembleWhenConfigured(t *testing.T) {
|
||||||
|
cfg := uploadCfg(t, true)
|
||||||
|
cfg.ReconcileBaseModel = "iguana/pianissimo"
|
||||||
|
cfg.ReconcileModel = "iguana/gemma4-26b"
|
||||||
|
|
||||||
|
in, w, err := buildUploads(context.Background(), cfg, &fakeUploadsStore{}, quietLog())
|
||||||
|
|
||||||
|
require.NoError(t, err)
|
||||||
|
assert.NotNil(t, in)
|
||||||
|
assert.NotNil(t, w)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user