Merge imported products into local session state
This commit is contained in:
@@ -19,8 +19,6 @@ func TestInventoryRestoreMapsSourceInsteadOfRemoteDestination(t *testing.T) {
|
||||
cfg := restorePlanConfig(t)
|
||||
fake := &storage.FakeBackend{}
|
||||
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{"transcripts/renamed.json": []byte(`{"segments":[]}`)})
|
||||
current.Manifest = nil
|
||||
current.ManifestData = nil
|
||||
current.Commit.Artifacts[1].Source = artifacts.ArtifactTranscriptFinalTrimmed
|
||||
plan, err := buildInventoryRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{})
|
||||
if err != nil {
|
||||
@@ -39,8 +37,6 @@ func TestInventoryRestoreProjectsSelectedTranscriptProducts(t *testing.T) {
|
||||
"transcripts/one.json": []byte(`{"segments":[]}`),
|
||||
"transcripts/two.md": []byte("synthetic transcript"),
|
||||
})
|
||||
current.Manifest = nil
|
||||
current.ManifestData = nil
|
||||
for i := range current.Commit.Artifacts {
|
||||
item := ¤t.Commit.Artifacts[i]
|
||||
switch filepath.Ext(item.DestinationKey) {
|
||||
@@ -73,7 +69,6 @@ func TestInventoryRestoreConflictsDoNotContributeCoverage(t *testing.T) {
|
||||
cfg := restorePlanConfig(t)
|
||||
fake := &storage.FakeBackend{}
|
||||
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{"transcripts/remote.json": []byte(`{"segments":[]}`)})
|
||||
current.Manifest = nil
|
||||
current.Commit.Artifacts[1].Source = artifacts.ArtifactTranscriptFinalTrimmed
|
||||
first, err := buildInventoryRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{})
|
||||
if err != nil || len(first.Actions) != 1 {
|
||||
@@ -103,7 +98,6 @@ func TestInventoryRestoreUsesCurrentConfiguredProductPath(t *testing.T) {
|
||||
}}
|
||||
fake := &storage.FakeBackend{}
|
||||
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{"artifacts/remote-name.md": []byte("synthetic recap")})
|
||||
current.Manifest = nil
|
||||
current.Commit.Artifacts[1].Source = artifacts.ConfiguredArtifactSourceID("recap")
|
||||
plan, err := buildInventoryRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{})
|
||||
if err != nil {
|
||||
@@ -122,7 +116,6 @@ func TestInventoryRestoreRejectsCollidingProductPaths(t *testing.T) {
|
||||
}}
|
||||
fake := &storage.FakeBackend{}
|
||||
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{"artifacts/a.md": []byte("a"), "artifacts/b.md": []byte("b")})
|
||||
current.Manifest = nil
|
||||
current.Commit.Artifacts[1].Source = artifacts.ConfiguredArtifactSourceID("first")
|
||||
current.Commit.Artifacts[2].Source = artifacts.ConfiguredArtifactSourceID("second")
|
||||
if _, err := buildInventoryRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{}); err == nil {
|
||||
@@ -149,7 +142,6 @@ func TestInventoryRestoreCandidatePreservesLocalProgress(t *testing.T) {
|
||||
}
|
||||
fake := &storage.FakeBackend{}
|
||||
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{"transcripts/remote.json": []byte(`{"segments":[]}`)})
|
||||
current.Manifest = nil
|
||||
current.Commit.Artifacts[1].Source = artifacts.ArtifactTranscriptFinalTrimmed
|
||||
plan, err := buildInventoryRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user