Preserve campaign defaults in materialized sessions
This commit is contained in:
@@ -65,7 +65,7 @@ func TestPreparedSessionPublishAndRemoteLoad(t *testing.T) {
|
||||
}
|
||||
prefix := artifacts.S3SessionPrefix("dnd", m.Campaign, m.SessionID)
|
||||
key := artifacts.S3RunRelativeDestinationKey(artifacts.S3RunPrefix(prefix, m.RunID), "prepare/inputs/session.yml")
|
||||
if got := string(fake.Objects[key].Data); !strings.Contains(got, "Published title") || strings.Contains(got, "imports:") || !strings.Contains(got, "speakers_file:") {
|
||||
if got := string(fake.Objects[key].Data); !strings.Contains(got, "Published title") || strings.Contains(got, "imports:") || strings.Contains(got, "speakers_file:") {
|
||||
t.Fatalf("published session = %q", got)
|
||||
}
|
||||
for _, name := range []string{"campaign.yml", "party.yml"} {
|
||||
@@ -85,7 +85,7 @@ func TestPreparedSessionPublishAndRemoteLoad(t *testing.T) {
|
||||
if received.Session.Title != "Published title" || received.SessionSource.S3Key != key {
|
||||
t.Fatalf("remote session = %#v, source=%#v", received.Session, received.SessionSource)
|
||||
}
|
||||
if got := received.StableInputs.SpeakersFile; got.Source != "session_config" || got.Path != filepath.Join(filepath.Dir(campaignPath), "speakers.yml") {
|
||||
if got := received.StableInputs.SpeakersFile; got.Source != "campaign_config" || got.Path != filepath.Join(filepath.Dir(campaignPath), "speakers.yml") {
|
||||
t.Fatalf("receiving campaign speakers = %#v", got)
|
||||
}
|
||||
current, err := discoverRemoteCurrentState(ctx, received, fake)
|
||||
|
||||
Reference in New Issue
Block a user