Skip to content

Commit

Permalink
Refactor prometheus integration tests (home-assistant#113849)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jzucker2 authored Oct 15, 2024
1 parent 2542ddd commit d2db25c
Showing 1 changed file with 1,219 additions and 708 deletions.
Loading

0 comments on commit d2db25c

Please sign in to comment.