Skip to content

Commit

Permalink
PWX-38585: PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Krpan <[email protected]>
  • Loading branch information
Pure-AdamuKaapan committed Aug 20, 2024
1 parent a54ebad commit f678c15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions csi/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,6 @@ func (s *OsdCsiServer) CreateVolume(
if spec.GetFADAPodName() != "" {
labels[api.SpecPurePodName] = spec.GetFADAPodName()
}
delete(labels, intreePvcNameKey)
delete(labels, intreePvcNamespaceKey)
delete(labels, api.SpecParent)
cloneResp, err := volumes.Clone(ctx, &api.SdkVolumeCloneRequest{
Name: req.GetName(),
ParentId: source.Parent,
Expand Down
5 changes: 3 additions & 2 deletions csi/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ func TestControllerCreateVolumeBadSnapshot(t *testing.T) {
// Return an error from snapshot
s.MockDriver().
EXPECT().
Snapshot(gomock.Any(), parent, false, &api.VolumeLocator{Name: name, VolumeLabels: nil}, false).
Snapshot(gomock.Any(), parent, false, &api.VolumeLocator{Name: name, VolumeLabels: map[string]string{api.SpecParent: parent}}, false).
Return("", fmt.Errorf("snapshoterr")).
Times(1),
)
Expand Down Expand Up @@ -2163,7 +2163,8 @@ func TestControllerCreateVolumeSnapshotThroughParameters(t *testing.T) {
s.MockDriver().
EXPECT().
Snapshot(gomock.Any(), mockParentID, false, &api.VolumeLocator{
Name: name,
Name: name,
VolumeLabels: map[string]string{api.SpecParent: mockParentID},
},
false).
Return(id, nil).
Expand Down

0 comments on commit f678c15

Please sign in to comment.