Refactor prometheus integration tests (#113849)

* Starting with a simple change

* And trying again but actually adding the new area to this

* And that's getting interesting

* Wanted to add some small things to gitignore too

* More metrics clean up

* The linter is harsh

* Need to adjust a ton of tests

* I was finally able to commit

* Trying to abstract metrics into a helper class

* Fixed some tests at least

* Making progress on tests

* Getting really close now

* Only 1 or 2 tests left to fix

* Only 1.5 tests left

* That's more than enough for tonight

* Got all the tests passing!

* Another pass at test clean up

* Fixed up all the tests, again

* More clean up needed

* Got device_class working just need to fix one test I broke

* Got all the existing tests working!

* Refactored helpers into a separate file

* I added some new tests! For the helpers, ironically

* Don't touch those files

* Don't include that either

* Added my first real test

* Rolling back some logic changes to focus solely on tests

* Curious what happens when I run the tests now

* Getting closer to making things pass

* Getting closer to a working pr now

* Keeping up with test fixes

* Getting much closer to something useful

* Saving piecemeal

* Getting closer to a final working version

* Now that's an improvement

* And moving a little forward

* And now I'm really inching closer

* Saving more complex test case fix

* And now only 3 tests left

* Getting close and only a few tests left

* I think I'm close with only 1 test left

* Does this mean the tests actually work now

* Was not using the helper classes anymore

* Now I'm really curious

* Need to rename the recently renamed class

* Was it really that easy? (No, it wasn't)

* Is this finally enough

* Also added another full percentage point of tests

* Trying to clean things up a bit more

* Now how does this look?

* Just a little more clean up

* Added a few more tests for the new helper functions

* Last pass on much better tests for this

* Oops, forgot to remove redundant tests

* Fix the fixtures

* Getting closer to something decent, I hope

* Another pass on the formatting of the number 1

* And yet another pass on these tests

* Tests cleaned up a bit more

* Minor updates as suggested

* Another pass on assert with metrics helper

* Now this is fully tested
pull/128383/head
Jordan Zucker 2024-10-15 05:22:36 -07:00 committed by GitHub
parent 2542ddd30a
commit d2db25c7dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1154 additions and 643 deletions

File diff suppressed because it is too large Load Diff