From 0bab888dc758b3c787195d46c0c83991113e77a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mu=C3=9Fler?= Date: Tue, 8 Dec 2020 23:05:47 +0100 Subject: [PATCH] Expect modify call. --- pkg/cluster/volumes_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/cluster/volumes_test.go b/pkg/cluster/volumes_test.go index ca049f1f1..5132283ad 100644 --- a/pkg/cluster/volumes_test.go +++ b/pkg/cluster/volumes_test.go @@ -266,7 +266,13 @@ func TestMigrateEBS(t *testing.T) { defer ctrl.Finish() resizer := mocks.NewMockVolumeResizer(ctrl) - resizer.EXPECT().DescribeVolumes(gomock.Eq([]string{"vol-1111"})).Return([]volumes.VolumeProperties{{VolumeType: "gp3"}}, nil) + resizer.EXPECT().DescribeVolumes(gomock.Eq([]string{"vol-1111"})).Return( + []volumes.VolumeProperties{ + {VolumeID: "persistent-volume-0", VolumeType: "gp2", Size: 100}, + {VolumeID: "persistent-volume-1", VolumeType: "gp3", Size: 100}}, nil) + + // expect onl ygp2 volume to be modified + resizer.EXPECT().ModifyVolume(gomock.Eq("persistent-volume-0"), gomock.Eq("gp3"), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) cluster.VolumeResizer = resizer cluster.executeEBSMigration()