Carry accepted chunk maps through the runner
This commit is contained in:
@@ -26,6 +26,25 @@ func TestCloneReferenceSlotsEmptyInputReturnsNil(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCloneSerializedArtifactPointerOwnsArtifactData(t *testing.T) {
|
||||
original := &SerializedArtifact{
|
||||
Kind: "test/artifact",
|
||||
Schema: ArtifactSchema{ID: "test.schema", JSONSchema: []byte(`{"type":"object"}`)},
|
||||
Content: []byte(`{"items":[]}`),
|
||||
Metadata: map[string]any{"count": 1},
|
||||
}
|
||||
cloned := CloneSerializedArtifactPointer(original)
|
||||
original.Schema.JSONSchema[0] = '['
|
||||
original.Content[0] = '['
|
||||
original.Metadata["count"] = 2
|
||||
if cloned == nil || string(cloned.Schema.JSONSchema) != `{"type":"object"}` || string(cloned.Content) != `{"items":[]}` || cloned.Metadata["count"] != 1 {
|
||||
t.Fatalf("CloneSerializedArtifactPointer() = %#v, want independent artifact data", cloned)
|
||||
}
|
||||
if CloneSerializedArtifactPointer(nil) != nil {
|
||||
t.Fatal("CloneSerializedArtifactPointer(nil) must return nil")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCloneReferenceSlotsPreservesFields(t *testing.T) {
|
||||
slots := []ReferenceSlot{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user