Render imported party rosters as canonical inputs
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -53,8 +52,12 @@ inputs:
|
||||
if cfg.Party.Source.Source != "campaign_config" || cfg.Party.Source.ConfigPath != campaignPath {
|
||||
t.Fatalf("party provenance = %#v, want campaign source", cfg.Party.Source)
|
||||
}
|
||||
if !bytes.Equal(cfg.Party.Canonical.Raw, partyYAML) {
|
||||
t.Fatal("canonical party bytes were not retained")
|
||||
canonical, err := cfg.Party.Canonical.YAML()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := ParseParty(canonical); err != nil {
|
||||
t.Fatalf("reload canonical party: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user