diff --git a/go/delivery/buildrecord_test.go b/go/delivery/buildrecord_test.go index 4f4f098..7f9b08a 100644 --- a/go/delivery/buildrecord_test.go +++ b/go/delivery/buildrecord_test.go @@ -9,10 +9,11 @@ import ( // The fixture's path is what the controller writes for a build request: strings.Trim(path, "/") at mesh-controller // internal/inventory/chain_requests.go:19, the module's directory in its repository (Build.Path, internal/chain/records.go:100). -// The fixture is a record the controller's own encoder wrote (json.Marshal of a chain.Build, mesh-controller +// The fixture started as a record the controller's own encoder wrote (json.Marshal of a chain.Build, mesh-controller // internal/chain, a throwaway test run once and deleted) with build-agent's build-1792395447088936520 values, plus a // manifest-digest and one made artifact (shape: mesh-controller internal/chain/records.go:91-117 Build, json tags, at commit -// 1f708e2d8d72e2c27dbeaba02f14c128d700eada; an outcome has no state key and a build asked after a merge no ref, records.go:57-59), which a BuildRecord does not carry. +// 1f708e2d8d72e2c27dbeaba02f14c128d700eada; an outcome has no state key and a build asked after a merge no ref, records.go:57-59), which a BuildRecord does not carry. It was then edited by hand +// to the controller's layout for an outcome: state and ref removed, the repository a clone URL (issue 1281). func loadBuildFixture(t *testing.T) []byte { t.Helper() raw, err := os.ReadFile("testdata/build-record-build-agent.json") diff --git a/go/delivery/trunk_test.go b/go/delivery/trunk_test.go index d97d94d..eaa8357 100644 --- a/go/delivery/trunk_test.go +++ b/go/delivery/trunk_test.go @@ -49,7 +49,7 @@ func TestIsTrunkBuild(t *testing.T) { // 1281/AC2 {"another branch", BuildRecord{Ref: "feat/x", SourceInputs: inputs}, false}, {"a commit", BuildRecord{Ref: "9efdd87a", SourceInputs: inputs}, false}, {"asked", BuildRecord{State: "asked", SourceInputs: inputs}, false}, - {"answered, state built", BuildRecord{State: "built", SourceInputs: inputs}, false}, + {"answered, state answered, no source inputs", BuildRecord{State: "answered"}, false}, {"failed", BuildRecord{Failed: "boom", Ref: "main", SourceInputs: inputs}, false}, {"no source inputs", BuildRecord{Ref: "main"}, false}, {"no ref and no source inputs", BuildRecord{}, false},