Skip to content

Modify coded tests to create resources in parallel #3090

@theunrepentantgeek

Description

@theunrepentantgeek

Describe the current behavior

We've identified that some of our coded tests (in the internal/controllers package) create all the resources one at a time and therefore don't reveal whether there are issues with our sequencing/ordering of resource creation.

Describe the improvement

Instead of calling CreateResourceAndWait() one at a time, we should modify the tests to call CreateResourcesAndWait() (the plural form) to create everything at once.

This may require rerecording the tests against live Azure, and may also flush out some edge case bugs we need to address.

Copilot Instructions

Scan tests in the controllers package to find cases where a single test makes multiple calls to CreateResourceAndWait() and there's a straightforward reordering of the code to group all the resource creations together into a single call.

  • If you spot any cases where the ARM ID of a resource is read from a newly created resource and used to construct a resource reference, modify that to use a within-cluster resource reference instead.
  • No changes outside the controllers package are required.

Metadata

Metadata

Assignees

Labels

low-priorityLow priority item. We'll get to it eventually.technical-debt 📈testTest refactoring related tasks

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions