Skip to content

Commit 4697c0b

Browse files
dhananjay-ngYashwantGohokar
authored andcommitted
Added lifecycle state check to boot volume e2e test
1 parent 3ff8e10 commit 4697c0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/e2e/framework/pvc_util.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ func (j *PVCTestJig) CreateBootVolume(c ocicore.ComputeClient, bs ocicore.Blocks
758758
instances, err := c.ListInstances(ctx, ocicore.ListInstancesRequest{
759759
AvailabilityDomain: &adLabel,
760760
CompartmentId: &compartmentId,
761+
LifecycleState: ocicore.InstanceLifecycleStateRunning,
761762
})
762763
if err != nil {
763764
Failf("Error listing instances: %v", err)
@@ -791,11 +792,15 @@ func (j *PVCTestJig) CreateBootVolume(c ocicore.ComputeClient, bs ocicore.Blocks
791792
},
792793
})
793794

795+
if err != nil {
796+
Failf("Failed create boot volume : %v", err)
797+
}
798+
794799
bootVolumeId := resp.BootVolume.Id
795800
Logf("Waiting for cloned boot volume %s to become available", *bootVolumeId)
796801
err = WaitForBootVolumeAvailable(ctx, bs, bootVolumeId)
797802
if err != nil {
798-
Failf("Failed to wait for block volume to become available: %v", err)
803+
Failf("Failed to wait for boot volume to become available: %v", err)
799804
}
800805

801806
return *bootVolumeId

0 commit comments

Comments
 (0)