Remove legacy configuration machinery
This commit is contained in:
@@ -99,11 +99,8 @@ func TestLocationOccurrenceConsumerDoesNotRunAfterRejectedRegistry(t *testing.T)
|
||||
|
||||
func TestLocationOccurrenceConfigurationRequiresEarlierRegistry(t *testing.T) {
|
||||
registries := productionNPCRegistries(t)
|
||||
cfg, err := configFromYAML(strings.Replace(locationPipelineConfig, "step: identify-locations", "step: track-location-occurrences", 1))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, err = cfg.Resolve(config.ResolveInput{PipelineID: "dnd-locations-fixture", Catalog: moduleCatalog(registries)})
|
||||
cfg := loadIntegrationConfigText(t, strings.Replace(locationPipelineConfig, "step: identify-locations", "step: track-location-occurrences", 1))
|
||||
_, err := cfg.Resolve(config.ResolveInput{PipelineID: "dnd-locations-fixture", Catalog: moduleCatalog(registries)})
|
||||
if err == nil || !strings.Contains(err.Error(), "earlier step") {
|
||||
t.Fatalf("Resolve() error = %v, want an earlier generated registry requirement", err)
|
||||
}
|
||||
@@ -129,10 +126,7 @@ func TestLocationOccurrenceCheckpointTracksGeneratedRegistry(t *testing.T) {
|
||||
|
||||
func resolveLocationPipeline(t *testing.T, registries pipeline.Registries) pipeline.ResolvedPipeline {
|
||||
t.Helper()
|
||||
cfg, err := configFromYAML(locationPipelineConfig)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cfg := loadIntegrationConfigText(t, locationPipelineConfig)
|
||||
effective, err := cfg.Resolve(config.ResolveInput{PipelineID: "dnd-locations-fixture", Catalog: moduleCatalog(registries)})
|
||||
if err != nil {
|
||||
t.Fatalf("Resolve() error = %v", err)
|
||||
@@ -144,26 +138,15 @@ func resolveLocationPipeline(t *testing.T, registries pipeline.Registries) pipel
|
||||
return resolved
|
||||
}
|
||||
|
||||
func configFromYAML(content string) (config.Config, error) {
|
||||
fileConfig, err := config.ParseFileConfigYAML([]byte(content))
|
||||
if err != nil {
|
||||
return config.Config{}, err
|
||||
}
|
||||
cfg := config.Default()
|
||||
if err := cfg.ApplyFileConfig(fileConfig); err != nil {
|
||||
return config.Config{}, err
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
const locationPipelineConfig = `version: 4
|
||||
const locationPipelineConfig = `version: 5
|
||||
cache:
|
||||
chunk_plans:
|
||||
mode: bypass
|
||||
checkpoints: {}
|
||||
pipelines:
|
||||
dnd-locations-fixture:
|
||||
input: seriatim
|
||||
input:
|
||||
module: seriatim
|
||||
output:
|
||||
module: json
|
||||
options:
|
||||
@@ -174,9 +157,9 @@ pipelines:
|
||||
- id: identify-locations
|
||||
artifacts:
|
||||
locations:
|
||||
extract: dnd/location-registry
|
||||
merge: appendorder
|
||||
normalize: dnd/location-registry
|
||||
extract: {module: dnd/location-registry}
|
||||
merge: {module: appendorder}
|
||||
normalize: {module: dnd/location-registry}
|
||||
- id: track-location-occurrences
|
||||
references:
|
||||
location_registry:
|
||||
@@ -185,9 +168,9 @@ pipelines:
|
||||
lane: locations
|
||||
artifacts:
|
||||
occurrences:
|
||||
extract: dnd/location-occurrences
|
||||
merge: appendorder
|
||||
normalize: dnd/location-occurrences
|
||||
extract: {module: dnd/location-occurrences}
|
||||
merge: {module: appendorder}
|
||||
normalize: {module: dnd/location-occurrences}
|
||||
`
|
||||
|
||||
type locationHandoffLLMClient struct {
|
||||
|
||||
Reference in New Issue
Block a user