Skip to content

Commit

Permalink
Fix e2e test flakes due to volume node affinity conflict
Browse files Browse the repository at this point in the history
Signed-off-by: hanenMizouni <[email protected]>
  • Loading branch information
outscale-hmi committed Oct 13, 2024
1 parent 41d9605 commit af6e8cd
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions tests/e2e/dynamic_provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,26 @@ var _ = Describe("[bsu-csi-e2e] [single-az] Dynamic Provisioning", func() {
})

It("should create multiple PV objects, bind to PVCs and attach all to a single pod", func() {
volumeBindingMode := storagev1.VolumeBindingWaitForFirstConsumer
pods := []testsuites.PodDetails{
{
Cmd: "echo 'hello world' > /mnt/test-1/data && echo 'hello world' > /mnt/test-2/data && grep 'hello world' /mnt/test-1/data && grep 'hello world' /mnt/test-2/data",
Volumes: []testsuites.VolumeDetails{
{
VolumeType: osccloud.VolumeTypeGP2,
FSType: bsucsidriver.FSTypeExt3,
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeGP2),
VolumeType: osccloud.VolumeTypeGP2,
FSType: bsucsidriver.FSTypeExt3,
VolumeBindingMode: &volumeBindingMode,
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeGP2),
VolumeMount: testsuites.VolumeMountDetails{
NameGenerate: "test-volume-",
MountPathGenerate: "/mnt/test-",
},
},
{
VolumeType: osccloud.VolumeTypeIO1,
FSType: bsucsidriver.FSTypeExt4,
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeIO1),
VolumeType: osccloud.VolumeTypeIO1,
FSType: bsucsidriver.FSTypeExt4,
VolumeBindingMode: &volumeBindingMode,
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeIO1),
VolumeMount: testsuites.VolumeMountDetails{
NameGenerate: "test-volume-",
MountPathGenerate: "/mnt/test-",
Expand Down Expand Up @@ -240,25 +243,28 @@ var _ = Describe("[bsu-csi-e2e] [single-az] Dynamic Provisioning", func() {
})

It("should create a raw block volume and a filesystem volume on demand and bind to the same pod", func() {
volumeBindingMode := storagev1.VolumeBindingWaitForFirstConsumer
pods := []testsuites.PodDetails{
{
Cmd: "dd if=/dev/zero of=/dev/xvda bs=1024k count=100 && echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",
Volumes: []testsuites.VolumeDetails{
{
VolumeType: osccloud.VolumeTypeIO1,
FSType: bsucsidriver.FSTypeExt4,
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeIO1),
VolumeType: osccloud.VolumeTypeIO1,
FSType: bsucsidriver.FSTypeExt4,
VolumeBindingMode: &volumeBindingMode,
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeIO1),
VolumeMount: testsuites.VolumeMountDetails{
NameGenerate: "test-volume-",
MountPathGenerate: "/mnt/test-",
},
},
{
VolumeType: osccloud.VolumeTypeGP2,
FSType: bsucsidriver.FSTypeExt4,
MountOptions: []string{"rw"},
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeGP2),
VolumeMode: testsuites.Block,
VolumeType: osccloud.VolumeTypeGP2,
FSType: bsucsidriver.FSTypeExt4,
VolumeBindingMode: &volumeBindingMode,
MountOptions: []string{"rw"},
ClaimSize: driver.MinimumSizeForVolumeType(osccloud.VolumeTypeGP2),
VolumeMode: testsuites.Block,
VolumeDevice: testsuites.VolumeDeviceDetails{
NameGenerate: "test-block-volume-",
DevicePath: "/dev/xvda",
Expand Down

0 comments on commit af6e8cd

Please sign in to comment.