azure-service-operator icon indicating copy to clipboard operation
azure-service-operator copied to clipboard

Tests need support for simulated errors

Open theunrepentantgeek opened this issue 3 years ago • 7 comments

We should cover various corner cases being able to inject certain failures. Some of this should be achievable using our existing envtest + recording framework and some may need some additional framework updates.

Ideas:

  • [ ] DeploymentAlreadyExists when we attempt to create it?
  • [ ] InternalServerError for a period of time from a service.
  • [ ] "Create" a resource that the operator doesn't know about but which already exists.
  • [ ] Deployment fails after some polling due to 5xx error.
  • [ ] Throttling from a service.
  • [ ] Simulated errors saving changes to spec or status (kube-apiserver instability)
  • [ ] Simulated loss of entire status

Originally logged as #1726 by @matthchr

theunrepentantgeek avatar Mar 15 '22 02:03 theunrepentantgeek

This is still true and something we should investigate further

matthchr avatar Oct 17 '22 23:10 matthchr

No status change from above, although a lot of this can be covered with our existing unit tests so the need isn't urgent.

matthchr avatar Mar 13 '23 23:03 matthchr

Still something we want to do.

theunrepentantgeek avatar Jul 31 '23 23:07 theunrepentantgeek

Still something we want to do, I have some ideas about how we could do this related to the "manually pump the reconciler" tests that I saw while helping with Karpenter.

matthchr avatar Nov 20 '23 23:11 matthchr

No change from above

matthchr avatar Apr 08 '24 23:04 matthchr

Would be nice to have.

theunrepentantgeek avatar Sep 23 '24 23:09 theunrepentantgeek

We still want to do this. I've been somewhat inspired by some stuff that Karpenter does but haven't had the time to port it over for us.

matthchr avatar Mar 17 '25 22:03 matthchr

No change from above.

matthchr avatar Sep 22 '25 22:09 matthchr