-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
472 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Integration tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
run: ./uv pip install --system -r requirements.test | ||
- name: Integration tests | ||
run: cd integration_tests && python test_banning_works.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* | ||
!.gitignore | ||
!configuration.yaml.j2 | ||
!.storage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 1, | ||
"key": "auth", | ||
"data": { | ||
"users": [ | ||
{ | ||
"id": "4586e7a920434634a1f78d239261e310", | ||
"group_ids": [ | ||
"system-read-only" | ||
], | ||
"is_owner": false, | ||
"is_active": true, | ||
"name": "Home Assistant Content", | ||
"system_generated": true, | ||
"local_only": false | ||
}, | ||
{ | ||
"id": "031d3289dc2f49acb7f1adfa07c3a7c3", | ||
"group_ids": [ | ||
"system-admin" | ||
], | ||
"is_owner": true, | ||
"is_active": true, | ||
"name": "test", | ||
"system_generated": false, | ||
"local_only": false | ||
} | ||
], | ||
"groups": [ | ||
{ | ||
"id": "system-admin", | ||
"name": "Administrators" | ||
}, | ||
{ | ||
"id": "system-users", | ||
"name": "Users" | ||
}, | ||
{ | ||
"id": "system-read-only", | ||
"name": "Read Only" | ||
} | ||
], | ||
"credentials": [ | ||
{ | ||
"id": "aa3453291c1942988310fe547ade633f", | ||
"user_id": "031d3289dc2f49acb7f1adfa07c3a7c3", | ||
"auth_provider_type": "homeassistant", | ||
"auth_provider_id": null, | ||
"data": { | ||
"username": "test" | ||
} | ||
} | ||
], | ||
"refresh_tokens": [ | ||
{ | ||
"id": "6cb333fa12f24327bcdd7e4e51c776f3", | ||
"user_id": "4586e7a920434634a1f78d239261e310", | ||
"client_id": null, | ||
"client_name": null, | ||
"client_icon": null, | ||
"token_type": "system", | ||
"created_at": "2024-04-02T11:15:41.523256+00:00", | ||
"access_token_expiration": 1800.0, | ||
"token": "dcd23c6489cb4eacf3854c8a3d88aa074c3856fd826a0a43db02eadd38d02105694a1bc161618a3590d0f943d413f044b8c6c35d46538cc0cb0b3d95034ca545", | ||
"jwt_key": "46b3b76c9917d9f279b40ef6369f9c0cfdc4dbd2189c70711b090f80833d0461222a43d4e9c7ece8aecb0102f03ab4913301b5d5bb8dd9776f465bc7cbce3c0f", | ||
"last_used_at": null, | ||
"last_used_ip": null, | ||
"expire_at": null, | ||
"credential_id": null, | ||
"version": "2024.3.3" | ||
}, | ||
{ | ||
"id": "e24a8a9334f043c59054b39c2c5b7ee7", | ||
"user_id": "031d3289dc2f49acb7f1adfa07c3a7c3", | ||
"client_id": "http://localhost:8123/", | ||
"client_name": null, | ||
"client_icon": null, | ||
"token_type": "normal", | ||
"created_at": "2024-04-02T11:21:51.364585+00:00", | ||
"access_token_expiration": 1800.0, | ||
"token": "5787f63f0321875b64653c72d6839cc18ed7543966a0fba206298ed2d68d9b81808c7919fa6896f75b5b1060c4fd5cdb7105141ca4c503a7d334c7924525bd56", | ||
"jwt_key": "9763063ce5b8e8a2f66a50cac764048b8f23623dc0e13f725ef7cf5eda3e4ad0c359f8edc576c4ea8c382ace16c22b4ebca3ea8cb8b126331cc41a1cb3dea001", | ||
"last_used_at": "2024-04-02T11:21:51.364625+00:00", | ||
"last_used_ip": "172.22.0.1", | ||
"expire_at": 1719832911.364625, | ||
"credential_id": "aa3453291c1942988310fe547ade633f", | ||
"version": "2024.3.3" | ||
} | ||
] | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
integration_tests/config/.storage/auth_provider.homeassistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 1, | ||
"key": "auth_provider.homeassistant", | ||
"data": { | ||
"users": [ | ||
{ | ||
"username": "test", | ||
"password": "JDJiJDEyJExmNEU4SkxtRXJXUk5hQk00RnJGTi55ei41SkJ1OUUxUWYwanZKbjdpWXNWcWI0RnN1TVZ1" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 1, | ||
"key": "core.analytics", | ||
"data": { | ||
"onboarded": true, | ||
"preferences": {}, | ||
"uuid": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 6, | ||
"key": "core.area_registry", | ||
"data": { | ||
"areas": [ | ||
{ | ||
"aliases": [], | ||
"floor_id": null, | ||
"icon": null, | ||
"id": "living_room", | ||
"labels": [], | ||
"name": "Living Room", | ||
"picture": null | ||
}, | ||
{ | ||
"aliases": [], | ||
"floor_id": null, | ||
"icon": null, | ||
"id": "kitchen", | ||
"labels": [], | ||
"name": "Kitchen", | ||
"picture": null | ||
}, | ||
{ | ||
"aliases": [], | ||
"floor_id": null, | ||
"icon": null, | ||
"id": "bedroom", | ||
"labels": [], | ||
"name": "Bedroom", | ||
"picture": null | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 3, | ||
"key": "core.config", | ||
"data": { | ||
"latitude": 52.3731339, | ||
"longitude": 4.8903147, | ||
"elevation": 0, | ||
"unit_system_v2": "metric", | ||
"location_name": "Home", | ||
"time_zone": "Europe/London", | ||
"external_url": null, | ||
"internal_url": null, | ||
"currency": "GBP", | ||
"country": "GB", | ||
"language": "en-GB" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 13, | ||
"key": "core.entity_registry", | ||
"data": { | ||
"entities": [ | ||
{ | ||
"aliases": [], | ||
"area_id": null, | ||
"capabilities": null, | ||
"config_entry_id": null, | ||
"device_class": null, | ||
"device_id": null, | ||
"disabled_by": null, | ||
"entity_category": null, | ||
"entity_id": "person.test", | ||
"hidden_by": null, | ||
"icon": null, | ||
"id": "72693e8b73c047a54626c6b7797eb30c", | ||
"has_entity_name": false, | ||
"labels": [], | ||
"name": null, | ||
"options": {}, | ||
"original_device_class": null, | ||
"original_icon": null, | ||
"original_name": "test", | ||
"platform": "person", | ||
"supported_features": 0, | ||
"translation_key": null, | ||
"unique_id": "test", | ||
"previous_unique_id": null, | ||
"unit_of_measurement": null | ||
}, | ||
{ | ||
"aliases": [], | ||
"area_id": null, | ||
"capabilities": null, | ||
"config_entry_id": "6033774d3d7ab2bb9c27bdfc049abb34", | ||
"device_class": null, | ||
"device_id": null, | ||
"disabled_by": null, | ||
"entity_category": null, | ||
"entity_id": "todo.shopping_list", | ||
"hidden_by": null, | ||
"icon": null, | ||
"id": "78b1ff228befca957379bd98c17259b3", | ||
"has_entity_name": true, | ||
"labels": [], | ||
"name": null, | ||
"options": {}, | ||
"original_device_class": null, | ||
"original_icon": "mdi:cart", | ||
"original_name": "Shopping List", | ||
"platform": "shopping_list", | ||
"supported_features": 15, | ||
"translation_key": "shopping_list", | ||
"unique_id": "6033774d3d7ab2bb9c27bdfc049abb34", | ||
"previous_unique_id": null, | ||
"unit_of_measurement": null | ||
}, | ||
{ | ||
"aliases": [], | ||
"area_id": null, | ||
"capabilities": null, | ||
"config_entry_id": "a113e87b06906e07bc1a1f22c3a70027", | ||
"device_class": null, | ||
"device_id": null, | ||
"disabled_by": null, | ||
"entity_category": null, | ||
"entity_id": "tts.google_en_com", | ||
"hidden_by": null, | ||
"icon": null, | ||
"id": "97787db29494084b9e4709e5f4a7a5af", | ||
"has_entity_name": false, | ||
"labels": [], | ||
"name": null, | ||
"options": {}, | ||
"original_device_class": null, | ||
"original_icon": null, | ||
"original_name": "Google en com", | ||
"platform": "google_translate", | ||
"supported_features": 0, | ||
"translation_key": null, | ||
"unique_id": "a113e87b06906e07bc1a1f22c3a70027", | ||
"previous_unique_id": null, | ||
"unit_of_measurement": null | ||
} | ||
], | ||
"deleted_entities": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 1, | ||
"key": "http.auth", | ||
"data": { | ||
"content_user": "4586e7a920434634a1f78d239261e310" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": 4, | ||
"minor_version": 1, | ||
"key": "onboarding", | ||
"data": { | ||
"done": [ | ||
"user", | ||
"core_config", | ||
"analytics", | ||
"integration" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"version": 2, | ||
"minor_version": 1, | ||
"key": "person", | ||
"data": { | ||
"items": [ | ||
{ | ||
"id": "test", | ||
"name": "test", | ||
"user_id": "031d3289dc2f49acb7f1adfa07c3a7c3", | ||
"device_trackers": [] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": 1, | ||
"minor_version": 1, | ||
"key": "trace.saved_traces", | ||
"data": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ban_allowlist: | ||
ip_addresses: {{ ALLOWLIST }} | ||
|
||
http: | ||
ip_ban_enabled: true | ||
login_attempts_threshold: 1 | ||
|
||
logger: | ||
default: warning | ||
logs: | ||
custom_components.ban_allowlist: debug |
Oops, something went wrong.