@@ -98,15 +98,19 @@ func TestIAM_GetIOReadyForNotAttachedVolume(t *testing.T) {
9898
9999 volumeList , err := client .ListVolumes (context .Background (), nil )
100100 require .NoErrorf (t , err , "Error listing volumes: %v" , err )
101+ volumeFound := false
102+
101103 for _ , vol := range volumeList {
102104 if vol .ID == volume .ID {
105+ volumeFound = true
103106 assert .Equal (t , linodego .VolumeActive , vol .Status )
104107 assert .Empty (t , vol .LinodeID )
105108 assert .Empty (t , vol .LinodeLabel )
106109 assert .False (t , vol .IOReady )
107110 break
108111 }
109112 }
113+ require .True (t , volumeFound , "Volume with ID %d not found in volumeList" , volume .ID )
110114
111115 volume , err = client .GetVolume (context .Background (), volume .ID )
112116 require .NoErrorf (t , err , "Error getting not attached volume: %v" , err )
@@ -133,7 +137,7 @@ func TestIAM_GetIOReadyForAttachedDetachedVolume(t *testing.T) {
133137 err = client .DetachVolume (context .Background (), volume .ID )
134138 require .NoErrorf (t , err , "Error detaching volume: %v" , err )
135139
136- volume , err = client .WaitForVolumeIOReadyStatus (context .Background (), volume .ID , false , 45 )
140+ _ , err = client .WaitForVolumeIOReadyStatus (context .Background (), volume .ID , false , 45 )
137141 require .NoErrorf (t , err , "Error waiting for IO Ready status of detached volume: %v" , err )
138142
139143 instanceVolumes , err := client .ListInstanceVolumes (context .Background (), instance .ID , nil )
0 commit comments