Add run manifest and logical output file contracts
This commit is contained in:
@@ -124,10 +124,13 @@ func TestContractsComposeAcrossPackages(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Encode() error = %v, want nil", err)
|
||||
}
|
||||
if output.ContentType != "application/json" {
|
||||
t.Fatalf("ContentType = %q, want application/json", output.ContentType)
|
||||
if len(output.Files) != 1 {
|
||||
t.Fatalf("len(Files) = %d, want 1", len(output.Files))
|
||||
}
|
||||
if len(output.Bytes) == 0 {
|
||||
if output.Files[0].ContentType != "application/json" {
|
||||
t.Fatalf("ContentType = %q, want application/json", output.Files[0].ContentType)
|
||||
}
|
||||
if len(output.Files[0].Bytes) == 0 {
|
||||
t.Fatal("len(Bytes) = 0, want encoded bytes")
|
||||
}
|
||||
}
|
||||
@@ -293,7 +296,12 @@ func (encoder compositionOutputEncoder) Encode(ctx context.Context, req contract
|
||||
}
|
||||
|
||||
return contracts.OutputResult{
|
||||
Bytes: encoded,
|
||||
ContentType: "application/json",
|
||||
Files: []contracts.OutputFile{
|
||||
{
|
||||
Name: "artifacts/generic.json",
|
||||
ContentType: "application/json",
|
||||
Bytes: encoded,
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user