@@ -57,7 +57,7 @@ func TestBuilds(t *testing.T) {
5757 },
5858 },
5959 {
60- Description : "Update build" ,
60+ Description : "Update build metadata " ,
6161 Route : testutil.MockRoute {
6262 Method : "PATCH" ,
6363 Endpoint : "/v3/builds/be9db090-ad79-41c1-9a01-6200d896f20f" ,
@@ -74,6 +74,27 @@ func TestBuilds(t *testing.T) {
7474 return c .Builds .Update (context .Background (), "be9db090-ad79-41c1-9a01-6200d896f20f" , r )
7575 },
7676 },
77+ {
78+ Description : "Update build image" ,
79+ Route : testutil.MockRoute {
80+ Method : "PATCH" ,
81+ Endpoint : "/v3/builds/be9db090-ad79-41c1-9a01-6200d896f20f" ,
82+ Output : g .Single (build ),
83+ PostForm : `{"state": "STAGED", "lifecycle": {"data": {"image": "image-identifier"}}}` ,
84+ Status : http .StatusOK ,
85+ },
86+ Expected : build ,
87+ Action : func (c * Client , t * testing.T ) (any , error ) {
88+ r := resource .NewBuildUpdate ()
89+ r .State = "STAGED"
90+ r .Lifecycle = & resource.Lifecycle {
91+ BuildpackData : resource.BuildpackLifecycle {
92+ Image : "image-identifier" ,
93+ },
94+ }
95+ return c .Builds .Update (context .Background (), "be9db090-ad79-41c1-9a01-6200d896f20f" , r )
96+ },
97+ },
7798 {
7899 Description : "List first page of builds" ,
79100 Route : testutil.MockRoute {
0 commit comments