Azure / azure-service-operator

Azure Service Operator allows you to create Azure resources using kubectl
https://azure.github.io/azure-service-operator/
MIT License
741 stars 196 forks source link

Deterministic Testcase ordering #4066

Closed theunrepentantgeek closed 5 months ago

theunrepentantgeek commented 5 months ago

What this PR does / why we need it:

Turns out that our test case ordering wasn't deterministic.

When calling NewTestFileDefinition() to generate a _test.go file, the slice of TypeDefinition passed in comes directly from a map (via maps.Values()) , and therefore has non-deterministic ordering.

Special notes for your reviewer:

I'm surprised we didn't observe this before, I'm guessing there's a change in go 1.22.2 as I just updated to that version (was running go 1.22.1 previously.

How does this PR make you feel: gif