Preserve derived publication and preparation evidence
This commit is contained in:
@@ -28,7 +28,7 @@ func TestPreparedSessionPublishAndRemoteLoad(t *testing.T) {
|
||||
enabled := true
|
||||
cfg.Pipeline.Publish.Enabled = &enabled
|
||||
cfg.Pipeline.Publish.UploadRun = &enabled
|
||||
cfg.Pipeline.Publish.Outputs = nil
|
||||
cfg.ArtifactCatalog.PublishOutputs = nil
|
||||
fake := &storage.FakeBackend{}
|
||||
store := artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root)
|
||||
env := &stage.Env{Config: cfg, ArtifactStore: store, ObjectStore: fake}
|
||||
@@ -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"} {
|
||||
@@ -84,7 +84,7 @@ func TestPreparedSessionPublishAndRemoteLoad(t *testing.T) {
|
||||
if loaded.Config.Session.Title != "Published title" || loaded.Config.SessionSource.S3Key != key {
|
||||
t.Fatalf("remote session = %#v, source=%#v", loaded.Config.Session, loaded.Config.SessionSource)
|
||||
}
|
||||
if got := loaded.Config.StableInputs.SpeakersFile; got.Source != "campaign_config" || got.Path != filepath.Join(filepath.Dir(campaignPath), "speakers.yml") {
|
||||
if got := loaded.Config.StableInputs.SpeakersFile; got.Source != "session_config" || got.Path != filepath.Join(filepath.Dir(campaignPath), "speakers.yml") {
|
||||
t.Fatalf("receiving campaign speakers = %#v", got)
|
||||
}
|
||||
current, err := discoverRemoteCurrentState(ctx, loaded.Config, fake)
|
||||
|
||||
Reference in New Issue
Block a user