Cut over public engine construction to ConfigKit sources
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"gitea.maximumdirect.net/eric/promptkit"
|
||||
"gitea.maximumdirect.net/eric/promptkit/testfixture"
|
||||
)
|
||||
|
||||
func retryHTTPResponse(status int, content string) *http.Response {
|
||||
@@ -30,7 +31,7 @@ func retryTestEngine(t *testing.T, budget *int, next func(int) *http.Response) (
|
||||
calls++
|
||||
return next(calls), nil
|
||||
})}
|
||||
engine, err := promptkit.NewEngine(config)
|
||||
engine, err := testfixture.NewEngine(config)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -71,7 +72,7 @@ func TestRetryValidationAndPreparedFreezing(t *testing.T) {
|
||||
negative := -1
|
||||
config := contractConfig(frameworkSchemaDir)
|
||||
config.TransientRetries = &negative
|
||||
if _, err := promptkit.NewEngine(config); !errors.Is(err, promptkit.ErrInvalidConfig) {
|
||||
if _, err := testfixture.NewEngine(config); !errors.Is(err, promptkit.ErrInvalidConfig) {
|
||||
t.Fatalf("negative engine budget = %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user