fix: pin native exports to stage execution service
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.a-wan.net/alan/pipelines/internal/opencode"
|
||||
"git.a-wan.net/alan/pipelines/internal/pipeline"
|
||||
"git.a-wan.net/alan/pipelines/internal/stage"
|
||||
)
|
||||
@@ -78,7 +77,6 @@ func TestAutomaticSessionExportRecoveryTransientThenComplete(t *testing.T) {
|
||||
func TestAutomaticSessionExportRecoveryWrongSessionExhaustsNeverClean(t *testing.T) {
|
||||
h, s, id := recoveryRunner(t)
|
||||
ctx := context.Background()
|
||||
dir := t.TempDir()
|
||||
var calls atomic.Int32
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
user, password, ok := r.BasicAuth()
|
||||
@@ -95,12 +93,7 @@ func TestAutomaticSessionExportRecoveryWrongSessionExhaustsNeverClean(t *testing
|
||||
w.Write([]byte(`{"info":{"id":"ses_wrong"},"messages":[{"info":{"role":"assistant"},"parts":[{"type":"text","text":"wrong"}]}]}`))
|
||||
}))
|
||||
t.Cleanup(srv.Close)
|
||||
passwordFile := filepath.Join(dir, "password")
|
||||
if err := os.WriteFile(passwordFile, []byte("fixture-password"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Setenv(opencode.EndpointEnvKey, srv.URL)
|
||||
t.Setenv(opencode.EndpointPasswordFileEnvKey, passwordFile)
|
||||
localExportService(t, srv.URL)
|
||||
h.runner.exportSession = stage.ExportSession
|
||||
for range 3 {
|
||||
job, _ := s.SessionExportJob(ctx, id, 1)
|
||||
|
||||
Reference in New Issue
Block a user