Skip to content

Commit

Permalink
Fix updates in mockalloydb
Browse files Browse the repository at this point in the history
  • Loading branch information
maqiuyujoyce committed Dec 17, 2024
1 parent e8292a7 commit 431125c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mockgcp/mockalloydb/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package mockalloydb
import (
"context"
"fmt"
"strings"

"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -188,7 +189,8 @@ func (s *AlloyDBAdminV1) UpdateInstance(ctx context.Context, req *pb.UpdateInsta

// TODO: Some sort of helper for fieldmask?
for _, path := range paths {
switch path {
topLevelField := strings.Split(path, ".")[0]
switch topLevelField {
case "labels":
obj.Labels = req.Instance.GetLabels()
case "annotations":
Expand Down

0 comments on commit 431125c

Please sign in to comment.