Skip to content

Commit e16c4c2

Browse files
parrneetcodycushing
authored andcommitted
Fix sweeper wait condition
1 parent 755bad8 commit e16c4c2

File tree

52 files changed

+52
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+52
-52
lines changed

oci/containerengine_cluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ func getClusterIds(compartment string) ([]string, error) {
310310
func clusterSweepWaitCondition(response common.OCIOperationResponse) bool {
311311
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
312312
if clusterResponse, ok := response.Response.(oci_containerengine.GetClusterResponse); ok {
313-
return clusterResponse.LifecycleState == oci_containerengine.ClusterLifecycleStateDeleted
313+
return clusterResponse.LifecycleState != oci_containerengine.ClusterLifecycleStateDeleted
314314
}
315315
return false
316316
}

oci/core_boot_volume_backup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func getBootVolumeBackupIds(compartment string) ([]string, error) {
313313
func bootVolumeBackupSweepWaitCondition(response common.OCIOperationResponse) bool {
314314
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
315315
if bootVolumeBackupResponse, ok := response.Response.(oci_core.GetBootVolumeBackupResponse); ok {
316-
return bootVolumeBackupResponse.LifecycleState == oci_core.BootVolumeBackupLifecycleStateTerminated
316+
return bootVolumeBackupResponse.LifecycleState != oci_core.BootVolumeBackupLifecycleStateTerminated
317317
}
318318
return false
319319
}

oci/core_boot_volume_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func getBootVolumeIds(compartment string) ([]string, error) {
372372
func bootVolumeSweepWaitCondition(response common.OCIOperationResponse) bool {
373373
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
374374
if bootVolumeResponse, ok := response.Response.(oci_core.GetBootVolumeResponse); ok {
375-
return bootVolumeResponse.LifecycleState == oci_core.BootVolumeLifecycleStateTerminated
375+
return bootVolumeResponse.LifecycleState != oci_core.BootVolumeLifecycleStateTerminated
376376
}
377377
return false
378378
}

oci/core_cross_connect_group_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ func getCrossConnectGroupIds(compartment string) ([]string, error) {
276276
func crossConnectGroupSweepWaitCondition(response common.OCIOperationResponse) bool {
277277
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
278278
if crossConnectGroupResponse, ok := response.Response.(oci_core.GetCrossConnectGroupResponse); ok {
279-
return crossConnectGroupResponse.LifecycleState == oci_core.CrossConnectGroupLifecycleStateTerminated
279+
return crossConnectGroupResponse.LifecycleState != oci_core.CrossConnectGroupLifecycleStateTerminated
280280
}
281281
return false
282282
}

oci/core_cross_connect_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ func getCrossConnectIds(compartment string) ([]string, error) {
309309
func crossConnectSweepWaitCondition(response common.OCIOperationResponse) bool {
310310
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
311311
if crossConnectResponse, ok := response.Response.(oci_core.GetCrossConnectResponse); ok {
312-
return crossConnectResponse.LifecycleState == oci_core.CrossConnectLifecycleStateTerminated
312+
return crossConnectResponse.LifecycleState != oci_core.CrossConnectLifecycleStateTerminated
313313
}
314314
return false
315315
}

oci/core_dhcp_options_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func getDhcpOptionsIds(compartment string) ([]string, error) {
294294
func dhcpOptionsSweepWaitCondition(response common.OCIOperationResponse) bool {
295295
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
296296
if dhcpOptionsResponse, ok := response.Response.(oci_core.GetDhcpOptionsResponse); ok {
297-
return dhcpOptionsResponse.LifecycleState == oci_core.DhcpOptionsLifecycleStateTerminated
297+
return dhcpOptionsResponse.LifecycleState != oci_core.DhcpOptionsLifecycleStateTerminated
298298
}
299299
return false
300300
}

oci/core_drg_attachment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func getDrgAttachmentIds(compartment string) ([]string, error) {
261261
func drgAttachmentSweepWaitCondition(response common.OCIOperationResponse) bool {
262262
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
263263
if drgAttachmentResponse, ok := response.Response.(oci_core.GetDrgAttachmentResponse); ok {
264-
return drgAttachmentResponse.LifecycleState == oci_core.DrgAttachmentLifecycleStateDetached
264+
return drgAttachmentResponse.LifecycleState != oci_core.DrgAttachmentLifecycleStateDetached
265265
}
266266
return false
267267
}

oci/core_drg_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func getDrgIds(compartment string) ([]string, error) {
252252
func drgSweepWaitCondition(response common.OCIOperationResponse) bool {
253253
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
254254
if drgResponse, ok := response.Response.(oci_core.GetDrgResponse); ok {
255-
return drgResponse.LifecycleState == oci_core.DrgLifecycleStateTerminated
255+
return drgResponse.LifecycleState != oci_core.DrgLifecycleStateTerminated
256256
}
257257
return false
258258
}

oci/core_image_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func getImageIds(compartment string) ([]string, error) {
289289
func imageSweepWaitCondition(response common.OCIOperationResponse) bool {
290290
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
291291
if imageResponse, ok := response.Response.(oci_core.GetImageResponse); ok {
292-
return imageResponse.LifecycleState == oci_core.ImageLifecycleStateDeleted
292+
return imageResponse.LifecycleState != oci_core.ImageLifecycleStateDeleted
293293
}
294294
return false
295295
}

oci/core_instance_console_connection_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func getInstanceConsoleConnectionIds(compartment string) ([]string, error) {
225225
func instanceConsoleConnectionSweepWaitCondition(response common.OCIOperationResponse) bool {
226226
// Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required.
227227
if instanceConsoleConnectionResponse, ok := response.Response.(oci_core.GetInstanceConsoleConnectionResponse); ok {
228-
return instanceConsoleConnectionResponse.LifecycleState == oci_core.InstanceConsoleConnectionLifecycleStateDeleted
228+
return instanceConsoleConnectionResponse.LifecycleState != oci_core.InstanceConsoleConnectionLifecycleStateDeleted
229229
}
230230
return false
231231
}

0 commit comments

Comments
 (0)