Add campaign and session glossary selections
This commit is contained in:
@@ -37,7 +37,7 @@ func TestSessionDefaultsCompleteBeforeNativeHandoff(t *testing.T) {
|
||||
if len(result.Sources()) != 2 {
|
||||
t.Fatalf("session sources include unrelated campaign inputs: %+v", result.Sources())
|
||||
}
|
||||
if cfg.Session.Campaign != "campaign" || cfg.Session.Inputs.GlossaryFile != filepath.Join(dir, "campaign/glossary.yml") || cfg.Session.Inputs.SpellCatalogFile != "" {
|
||||
if cfg.Session.Campaign != "campaign" || OptionalString(cfg.Session.Inputs.GlossaryFile) != filepath.Join(dir, "campaign/glossary.yml") || cfg.Session.Inputs.SpellCatalogFile != "" {
|
||||
t.Fatalf("session defaults/explicit clearing: %+v", cfg.Session)
|
||||
}
|
||||
if cfg.StableInputs.GlossaryFile.Source != "campaign_config" || cfg.StableInputs.GlossaryFile.ConfigPath != fragment || cfg.StableInputs.SpeakersFile.ConfigPath != sessionFragment || cfg.StableInputs.SpellCatalogFile.Source != "session_config" {
|
||||
@@ -104,7 +104,7 @@ func TestSessionDefaultsCompleteBeforeNativeHandoff(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if reloaded.Inputs.GlossaryFile != receiving.Inputs.GlossaryFile || reloaded.Inputs.AutocorrectFile != receiving.Inputs.AutocorrectFile {
|
||||
if OptionalString(reloaded.Inputs.GlossaryFile) != OptionalString(receiving.Inputs.GlossaryFile) || reloaded.Inputs.AutocorrectFile != receiving.Inputs.AutocorrectFile {
|
||||
t.Fatalf("materialization froze inherited inputs: %+v", reloaded.Inputs)
|
||||
}
|
||||
if reloaded.Inputs.SpeakersFile != cfg.Session.Inputs.SpeakersFile || reloaded.Inputs.SpellCatalogFile != "" {
|
||||
@@ -141,7 +141,6 @@ func TestSessionDefaultsRespectExplicitEmptyInputsAndIdentity(t *testing.T) {
|
||||
}
|
||||
opts := SessionLoadOptions{Campaign: campaign, CampaignPath: campaignPath, SessionID: "session"}
|
||||
for _, data := range []string{
|
||||
"session_id: session\ninputs: {audio_dir: audio, glossary_file: ''}\n",
|
||||
"session_id: session\ncampaign: ''\ninputs: {audio_dir: audio}\n",
|
||||
"session_id: session\ninputs: null\n",
|
||||
} {
|
||||
|
||||
Reference in New Issue
Block a user