Make configuration truthful and clean remote session files
This commit is contained in:
@@ -135,15 +135,14 @@ func (prepareStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*S
|
||||
source.Source = "session_config"
|
||||
}
|
||||
inputs = append(inputs, manifest.InputRecord{
|
||||
Kind: "session_config",
|
||||
Path: path,
|
||||
Checksum: checksum,
|
||||
Source: source.Source,
|
||||
S3Bucket: source.S3Bucket,
|
||||
S3Key: source.S3Key,
|
||||
S3Size: source.S3Size,
|
||||
S3ETag: source.S3ETag,
|
||||
SpoolPath: source.SpoolPath,
|
||||
Kind: "session_config",
|
||||
Path: path,
|
||||
Checksum: checksum,
|
||||
Source: source.Source,
|
||||
S3Bucket: source.S3Bucket,
|
||||
S3Key: source.S3Key,
|
||||
S3Size: source.S3Size,
|
||||
S3ETag: source.S3ETag,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ func TestPrepareStageRecordsRemoteSessionProvenance(t *testing.T) {
|
||||
S3Key: "dnd/campaigns/sample-campaign/sessions/2026-05-03/session.yml",
|
||||
S3Size: 58,
|
||||
S3ETag: "session-etag",
|
||||
SpoolPath: remoteSessionPath,
|
||||
}
|
||||
env.Config.Pipeline.Spool = config.SpoolConfig{Root: filepath.Join(t.TempDir(), "spool")}
|
||||
env.Config.Pipeline.Storage.S3 = &config.StorageS3Config{Bucket: "my-dnd-archive", RootPrefix: "dnd"}
|
||||
@@ -207,7 +206,7 @@ func TestPrepareStageRecordsRemoteSessionProvenance(t *testing.T) {
|
||||
if sessionInput.S3Bucket != "my-dnd-archive" || sessionInput.S3Key != "dnd/campaigns/sample-campaign/sessions/2026-05-03/session.yml" {
|
||||
t.Fatalf("remote session input missing bucket/key: %#v", sessionInput)
|
||||
}
|
||||
if sessionInput.S3Size != 58 || sessionInput.S3ETag != "session-etag" || sessionInput.SpoolPath != remoteSessionPath {
|
||||
if sessionInput.S3Size != 58 || sessionInput.S3ETag != "session-etag" || sessionInput.SpoolPath != "" {
|
||||
t.Fatalf("remote session input missing metadata: %#v", sessionInput)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user