Commit Graph

32 Commits

Author SHA1 Message Date
epenet
7b1b229718 Standardize homeassistant imports in component tests (a-l) (#136806) 2025-01-29 10:00:45 +01:00
Mike Degatano
ed4f55406c Replace Supervisor resolution API calls with aiohasupervisor (#129599)
* Replace Supervisor resolution API calls with aiohasupervisor

* Use consistent types to avoid uuid issues

* Fix mocking in http test

* Changes from feedback

* Put hass first

* Fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-07 01:33:51 +01:00
Mike Degatano
673f0224c9 Continue migration of methods from handler to aiohasupervisor (#129183) 2024-10-29 14:33:21 +01:00
Mike Degatano
ad55c9cc19 Remaining addon management to aiohasupervisor (#128484)
* Move set addon options to aiohasupervisor

* addon stats to aiohasupervisor and test fixes

* addon changelogs to aiohasupervisor

* Raise correct error for library in tests

* Cache client in instance property

* Use singleton method rather then HassIO instance method

* Mock supervisor client in more tests
2024-10-21 16:41:00 +02:00
Jan Bouwhuis
edb30af441 Fix hassio data fetching over list[Repository] (#128206)
* Fix hassio data fetching over list[Repository]

* Parameterize store mock and add store data to sensor tests
2024-10-12 14:44:26 +02:00
Mike Degatano
a9aa5ad229 Use aiohasupervisor for store APIs (#126780)
* Use aiohasupervosor for store addon info

* Use aiohasupervisor install addon

* Use aiohasupervisor for store info API

* Fix onboarding test

* Changes from feedback

* Move get_supervisor_client out of constructor

* Mock supervisor_client in tests

* Make property private
2024-10-10 10:27:20 +02:00
Mike Degatano
97d0d91d2c Use aiohasupervisor for addon info calls (#125926)
* Use aiohasupervisor for addon info calls

* Fix issue/repair tests in supervisor

* Fixes from feedback
2024-09-17 23:22:35 +02:00
epenet
3ac0fa53c8 Cleanup unused FixtureRequest in tests (#118780) 2024-06-04 11:49:21 +02:00
Mike Degatano
dbcef2e3c3 Add more supervisor info to system info panel (#115715)
* Add virtualization field fo system info

* Add ntp sync and host connectivity

* Prevent nonetype errors

* Add supervisor_connectivity and fix tests

* Add mock of network info to other fixtures

* Update more fixtures with network/info mock
2024-05-28 16:14:42 +02:00
epenet
0b01326f9f Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
J. Nick Koston
65358c129a Replace periodic tasks with background tasks (#112726)
* Phase out periodic tasks

* false by default or some tests will block forever, will need to fix each one manually

* kwarg works

* kwarg works

* kwarg works

* fixes

* fix more tests

* fix more tests

* fix lifx

* opensky

* pvpc_hourly_pricing

* adjust more

* adjust more

* smarttub

* adjust more

* adjust more

* adjust more

* adjust more

* adjust

* no eager executor

* zha

* qnap_qsw

* fix more

* fix fix

* docs

* its a wrapper now

* add more coverage

* coverage

* cover all combos

* more fixes

* more fixes

* more fixes

* remaining issues are legit bugs in tests

* make tplink test more predictable

* more fixes

* feedreader

* grind out some more

* make test race safe

* one more
2024-03-08 21:45:10 -05:00
Marc Mueller
c88b337600 Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick Koston
a6b17dbe68 Schedule polling as periodic tasks (#112640)
* Schedule periodic coordinator updates as background tasks.

Currently, the coordinator's periodic refreshes delay startup because they are not scheduled as background tasks. We will wait if the startup takes long enough for the first planned refresh. Another coordinator's scheduled refresh will be fired on busy systems, further delaying the startup. This chain of events results in the startup taking a long time and hitting the safety timeout because too many coordinators are refreshing.

This case can also happen with scheduled entity refreshes, but it's less common. A future PR will address that case.

* periodic_tasks

* periodic_tasks

* periodic_tasks

* merge

* merge

* merge

* merge

* merge

* fix test that call the sync api from async

* one more place

* cannot chain

* async_run_periodic_hass_job

* sun and pattern time changes from automations also block startup

* Revert "sun and pattern time changes from automations also block startup"

This reverts commit 6de2defa05.

* make sure polling is cancelled when config entry is unloaded

* Revert "Revert "sun and pattern time changes from automations also block startup""

This reverts commit e8f12aad55.

* remove DisabledError from homewizard test as it relies on a race

* fix race

* direct coverage
2024-03-07 23:32:26 -05:00
J. Nick Koston
4447336083 Fix hassio delaying startup to fetch container stats (#102775) 2023-10-25 15:32:43 +02:00
J. Nick Koston
c0904c905d Avoid updating hassio addon data when there are no entities consuming it (#101382) 2023-10-06 12:14:48 +02:00
Joakim Sørensen
11e21378b1 Add sensors for supervisor host (#89461)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-13 15:39:49 +01:00
Joakim Sørensen
4f29e1e180 Add stats sensors for core and supervisor (#89455)
* Add stats sensors for core and supervisor

* Update homeassistant/components/hassio/__init__.py
2023-03-09 19:06:35 +01:00
epenet
853bd52a22 Adjust entity registry access in tests (1) (#88950) 2023-03-01 09:11:14 +01:00
Franck Nijhof
ed79265843 Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
89e4ee5320 Add type hints to integration tests (part 8) (#87982) 2023-02-13 11:13:48 +01:00
Mike Degatano
82151bfd40 Create repairs for unsupported and unhealthy (#80747) 2022-10-31 09:57:54 -04:00
Mike Degatano
416c10a793 Supervisor update entity auto update from api (#79611)
* Supervisor update entity auto update from api

* Update api mocks in tests
2022-10-05 08:27:56 +02:00
Joakim Sørensen
3a0111e65d Use supervisor envs instead of hassio (#72601) 2022-05-30 12:00:13 +02:00
Joakim Sørensen
a5dc95e715 Fix adding OS entities for supervised installations (#69539) 2022-04-07 13:34:20 +02:00
Joakim Sørensen
cfdfa3eab2 Make hassio coordinator refresh data (#69272) 2022-04-04 17:34:06 +02:00
Joakim Sørensen
78e4d7e1ca Add auto_update property to supervisor and addon update entities (#69055) 2022-04-01 08:31:39 -07:00
Joakim Sørensen
d17f8e9ed6 Add update platform to the Supervisor integration (#68475) 2022-03-22 12:21:12 +01:00
Franck Nijhof
3afadf8adb Revert "Block peer certs on supervisor" (#67104) 2022-02-23 12:32:07 +01:00
Paulus Schoutsen
938b64081b Block peer certs on supervisor (#66837)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2022-02-22 13:59:40 -08:00
Joakim Sørensen
737dd6fc26 Add tests to hassio binary_sensor platform (#60609) 2021-12-01 21:41:31 +01:00
Joakim Sørensen
f15840e7ff Limit add-on stats to add-ons that are running (#58479) 2021-10-26 19:58:17 +02:00
avee87
a0bb2c8b33 Add memory/cpu percentage to Supervisor addons entities (#57468)
* Add memory/cpu percentage to Supervisor addons entities

* fixed lint

* Use a single update function. Fixed tests

* use constant

* review comments

* oops
2021-10-22 12:23:21 +02:00