Skip to content

Commit bcf108d

Browse files
committed
acc: Fix pipelines update to set default for storage
1 parent 396b7e0 commit bcf108d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

libs/testserver/pipelines.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ func (s *FakeWorkspace) PipelineCreate(req Request) Response {
6666
func (s *FakeWorkspace) PipelineUpdate(req Request, pipelineId string) Response {
6767
defer s.LockUnlock()()
6868

69-
var request pipelines.PipelineSpec
70-
err := json.Unmarshal(req.Body, &request)
69+
var spec pipelines.PipelineSpec
70+
err := json.Unmarshal(req.Body, &spec)
7171
if err != nil {
7272
return Response{
7373
Body: fmt.Sprintf("internal error: %s", err),
@@ -82,7 +82,12 @@ func (s *FakeWorkspace) PipelineUpdate(req Request, pipelineId string) Response
8282
}
8383
}
8484

85-
item.Spec = &request
85+
spec.Id = pipelineId
86+
if spec.Storage == "" && spec.Catalog == "" {
87+
spec.Storage = "dbfs:/pipelines/" + pipelineId
88+
}
89+
90+
item.Spec = &spec
8691
s.Pipelines[pipelineId] = item
8792

8893
return Response{

0 commit comments

Comments
 (0)