Move Freebox tests to fixtures (#103128)
This commit is contained in:
parent
620a3350d7
commit
f55cd17982
11 changed files with 3145 additions and 2869 deletions
File diff suppressed because it is too large
Load diff
35
tests/components/freebox/fixtures/call_get_calls_log.json
Normal file
35
tests/components/freebox/fixtures/call_get_calls_log.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
[
|
||||
{
|
||||
"number": "0988290475",
|
||||
"type": "missed",
|
||||
"id": 94,
|
||||
"duration": 15,
|
||||
"datetime": 1613752718,
|
||||
"contact_id": 0,
|
||||
"line_id": 0,
|
||||
"name": "0988290475",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"number": "0367250217",
|
||||
"type": "missed",
|
||||
"id": 93,
|
||||
"duration": 25,
|
||||
"datetime": 1613662328,
|
||||
"contact_id": 0,
|
||||
"line_id": 0,
|
||||
"name": "0367250217",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"number": "0184726018",
|
||||
"type": "missed",
|
||||
"id": 92,
|
||||
"duration": 25,
|
||||
"datetime": 1613225098,
|
||||
"contact_id": 0,
|
||||
"line_id": 0,
|
||||
"name": "0184726018",
|
||||
"new": true
|
||||
}
|
||||
]
|
14
tests/components/freebox/fixtures/connection_get_status.json
Normal file
14
tests/components/freebox/fixtures/connection_get_status.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"type": "ethernet",
|
||||
"rate_down": 198900,
|
||||
"bytes_up": 12035728872949,
|
||||
"ipv4_port_range": [0, 65535],
|
||||
"rate_up": 1440000,
|
||||
"bandwidth_up": 700000000,
|
||||
"ipv6": "2a01:e35:ffff:ffff::1",
|
||||
"bandwidth_down": 1000000000,
|
||||
"media": "ftth",
|
||||
"state": "up",
|
||||
"bytes_down": 2355966141297,
|
||||
"ipv4": "82.67.00.00"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"refresh": 2000,
|
||||
"value": "alarm2_armed",
|
||||
"value_type": "string"
|
||||
}
|
2545
tests/components/freebox/fixtures/home_get_nodes.json
Normal file
2545
tests/components/freebox/fixtures/home_get_nodes.json
Normal file
File diff suppressed because it is too large
Load diff
14
tests/components/freebox/fixtures/home_pir_get_values.json
Normal file
14
tests/components/freebox/fixtures/home_pir_get_values.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"category": "",
|
||||
"ep_type": "signal",
|
||||
"id": 6,
|
||||
"label": "Détection",
|
||||
"name": "trigger",
|
||||
"ui": {
|
||||
"access": "w",
|
||||
"display": "toggle"
|
||||
},
|
||||
"value": false,
|
||||
"value_type": "bool",
|
||||
"visibility": "normal"
|
||||
}
|
274
tests/components/freebox/fixtures/lan_get_hosts_list.json
Normal file
274
tests/components/freebox/fixtures/lan_get_hosts_list.json
Normal file
|
@ -0,0 +1,274 @@
|
|||
[
|
||||
{
|
||||
"l2ident": {
|
||||
"id": "8C:97:EA:00:00:00",
|
||||
"type": "mac_address"
|
||||
},
|
||||
"active": true,
|
||||
"persistent": false,
|
||||
"names": [
|
||||
{
|
||||
"name": "d633d0c8-958c-43cc-e807-d881b076924b",
|
||||
"source": "mdns"
|
||||
},
|
||||
{
|
||||
"name": "Freebox Player POP",
|
||||
"source": "mdns_srv"
|
||||
}
|
||||
],
|
||||
"vendor_name": "Freebox SAS",
|
||||
"host_type": "smartphone",
|
||||
"interface": "pub",
|
||||
"id": "ether-8c:97:ea:00:00:00",
|
||||
"last_time_reachable": 1614107652,
|
||||
"primary_name_manual": false,
|
||||
"l3connectivities": [
|
||||
{
|
||||
"addr": "192.168.1.180",
|
||||
"active": true,
|
||||
"reachable": true,
|
||||
"last_activity": 1614107614,
|
||||
"af": "ipv4",
|
||||
"last_time_reachable": 1614104242
|
||||
},
|
||||
{
|
||||
"addr": "fe80::dcef:dbba:6604:31d1",
|
||||
"active": true,
|
||||
"reachable": true,
|
||||
"last_activity": 1614107645,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1614107645
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:8102:4704:7ce0:2ace",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1611574428,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1611574428
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:c8e5:c524:c96d:5f5e",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1612475101,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1612475101
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:583a:49df:1df0:c2df",
|
||||
"active": true,
|
||||
"reachable": true,
|
||||
"last_activity": 1614107652,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1614107652
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:147e:3569:86ab:6aaa",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1612486752,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1612486752
|
||||
}
|
||||
],
|
||||
"default_name": "Freebox Player POP",
|
||||
"model": "fbx8am",
|
||||
"reachable": true,
|
||||
"last_activity": 1614107652,
|
||||
"primary_name": "Freebox Player POP"
|
||||
},
|
||||
{
|
||||
"l2ident": {
|
||||
"id": "DE:00:B0:00:00:00",
|
||||
"type": "mac_address"
|
||||
},
|
||||
"active": false,
|
||||
"persistent": false,
|
||||
"vendor_name": "",
|
||||
"host_type": "workstation",
|
||||
"interface": "pub",
|
||||
"id": "ether-de:00:b0:00:00:00",
|
||||
"last_time_reachable": 1607125599,
|
||||
"primary_name_manual": false,
|
||||
"default_name": "",
|
||||
"l3connectivities": [
|
||||
{
|
||||
"addr": "192.168.1.181",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1607125599,
|
||||
"af": "ipv4",
|
||||
"last_time_reachable": 1607125599
|
||||
},
|
||||
{
|
||||
"addr": "192.168.1.182",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1605958758,
|
||||
"af": "ipv4",
|
||||
"last_time_reachable": 1605958758
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:dc00:b0ff:fedf:e30",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1607125594,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1607125594
|
||||
}
|
||||
],
|
||||
"reachable": false,
|
||||
"last_activity": 1607125599,
|
||||
"primary_name": ""
|
||||
},
|
||||
{
|
||||
"l2ident": {
|
||||
"id": "DC:00:B0:00:00:00",
|
||||
"type": "mac_address"
|
||||
},
|
||||
"active": true,
|
||||
"persistent": false,
|
||||
"names": [
|
||||
{
|
||||
"name": "Repeteur-Wifi-Freebox",
|
||||
"source": "mdns"
|
||||
},
|
||||
{
|
||||
"name": "Repeteur Wifi Freebox",
|
||||
"source": "mdns_srv"
|
||||
}
|
||||
],
|
||||
"vendor_name": "",
|
||||
"host_type": "freebox_wifi",
|
||||
"interface": "pub",
|
||||
"id": "ether-dc:00:b0:00:00:00",
|
||||
"last_time_reachable": 1614107678,
|
||||
"primary_name_manual": false,
|
||||
"l3connectivities": [
|
||||
{
|
||||
"addr": "192.168.1.145",
|
||||
"active": true,
|
||||
"reachable": true,
|
||||
"last_activity": 1614107678,
|
||||
"af": "ipv4",
|
||||
"last_time_reachable": 1614107678
|
||||
},
|
||||
{
|
||||
"addr": "fe80::de00:b0ff:fe52:6ef6",
|
||||
"active": true,
|
||||
"reachable": true,
|
||||
"last_activity": 1614107608,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1614107603
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:de00:b0ff:fe52:6ef6",
|
||||
"active": true,
|
||||
"reachable": true,
|
||||
"last_activity": 1614107618,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1614107618
|
||||
}
|
||||
],
|
||||
"default_name": "Repeteur Wifi Freebox",
|
||||
"model": "fbxwmr",
|
||||
"reachable": true,
|
||||
"last_activity": 1614107678,
|
||||
"primary_name": "Repeteur Wifi Freebox"
|
||||
},
|
||||
{
|
||||
"l2ident": {
|
||||
"id": "5E:65:55:00:00:00",
|
||||
"type": "mac_address"
|
||||
},
|
||||
"active": false,
|
||||
"persistent": false,
|
||||
"names": [
|
||||
{
|
||||
"name": "iPhoneofQuentin",
|
||||
"source": "dhcp"
|
||||
},
|
||||
{
|
||||
"name": "iPhone-of-Quentin",
|
||||
"source": "mdns"
|
||||
}
|
||||
],
|
||||
"vendor_name": "",
|
||||
"host_type": "smartphone",
|
||||
"interface": "pub",
|
||||
"id": "ether-5e:65:55:00:00:00",
|
||||
"last_time_reachable": 1612611982,
|
||||
"primary_name_manual": false,
|
||||
"default_name": "iPhonedeQuentin",
|
||||
"l3connectivities": [
|
||||
{
|
||||
"addr": "192.168.1.148",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1612611973,
|
||||
"af": "ipv4",
|
||||
"last_time_reachable": 1612611973
|
||||
},
|
||||
{
|
||||
"addr": "fe80::14ca:6c30:938b:e281",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1609693223,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1609693223
|
||||
},
|
||||
{
|
||||
"addr": "fe80::1c90:2b94:1ba2:bd8b",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1610797303,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1610797303
|
||||
},
|
||||
{
|
||||
"addr": "fe80::8c8:e58b:838e:6785",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1612611951,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1612611946
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:f0e7:e198:3a69:58",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1609693245,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1609693245
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:1dc4:c6f8:aa20:c83b",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1610797176,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1610797176
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:6cf6:5811:1770:c662",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1612611982,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1612611982
|
||||
},
|
||||
{
|
||||
"addr": "2a01:e34:eda1:eb40:438:9b2c:4f8f:f48a",
|
||||
"active": false,
|
||||
"reachable": false,
|
||||
"last_activity": 1612611946,
|
||||
"af": "ipv6",
|
||||
"last_time_reachable": 1612611946
|
||||
}
|
||||
],
|
||||
"reachable": false,
|
||||
"last_activity": 1612611982,
|
||||
"primary_name": "iPhoneofQuentin"
|
||||
}
|
||||
]
|
109
tests/components/freebox/fixtures/storage_get_disks.json
Normal file
109
tests/components/freebox/fixtures/storage_get_disks.json
Normal file
|
@ -0,0 +1,109 @@
|
|||
[
|
||||
{
|
||||
"idle_duration": 0,
|
||||
"read_error_requests": 0,
|
||||
"read_requests": 1815106,
|
||||
"spinning": true,
|
||||
"table_type": "raid",
|
||||
"firmware": "0001",
|
||||
"type": "sata",
|
||||
"idle": true,
|
||||
"connector": 2,
|
||||
"id": 1000,
|
||||
"write_error_requests": 0,
|
||||
"time_before_spindown": 600,
|
||||
"state": "disabled",
|
||||
"write_requests": 80386151,
|
||||
"total_bytes": 2000000000000,
|
||||
"model": "ST2000LM015-2E8174",
|
||||
"active_duration": 0,
|
||||
"temp": 30,
|
||||
"serial": "ZDZLBFHC",
|
||||
"partitions": [
|
||||
{
|
||||
"fstype": "raid",
|
||||
"total_bytes": 0,
|
||||
"label": "Volume 2000Go",
|
||||
"id": 1000,
|
||||
"internal": false,
|
||||
"fsck_result": "no_run_yet",
|
||||
"state": "umounted",
|
||||
"disk_id": 1000,
|
||||
"free_bytes": 0,
|
||||
"used_bytes": 0,
|
||||
"path": "L1ZvbHVtZSAyMDAwR28="
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"idle_duration": 0,
|
||||
"read_error_requests": 0,
|
||||
"read_requests": 3622038,
|
||||
"spinning": true,
|
||||
"table_type": "raid",
|
||||
"firmware": "0001",
|
||||
"type": "sata",
|
||||
"idle": true,
|
||||
"connector": 0,
|
||||
"id": 2000,
|
||||
"write_error_requests": 0,
|
||||
"time_before_spindown": 600,
|
||||
"state": "disabled",
|
||||
"write_requests": 80386151,
|
||||
"total_bytes": 2000000000000,
|
||||
"model": "ST2000LM015-2E8174",
|
||||
"active_duration": 0,
|
||||
"temp": 31,
|
||||
"serial": "ZDZLEJXE",
|
||||
"partitions": [
|
||||
{
|
||||
"fstype": "raid",
|
||||
"total_bytes": 0,
|
||||
"label": "Volume 2000Go 1",
|
||||
"id": 2000,
|
||||
"internal": false,
|
||||
"fsck_result": "no_run_yet",
|
||||
"state": "umounted",
|
||||
"disk_id": 2000,
|
||||
"free_bytes": 0,
|
||||
"used_bytes": 0,
|
||||
"path": "L1ZvbHVtZSAyMDAwR28gMQ=="
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"idle_duration": 0,
|
||||
"read_error_requests": 0,
|
||||
"read_requests": 0,
|
||||
"spinning": false,
|
||||
"table_type": "superfloppy",
|
||||
"firmware": "",
|
||||
"type": "raid",
|
||||
"idle": false,
|
||||
"connector": 0,
|
||||
"id": 3000,
|
||||
"write_error_requests": 0,
|
||||
"state": "enabled",
|
||||
"write_requests": 0,
|
||||
"total_bytes": 2000000000000,
|
||||
"model": "",
|
||||
"active_duration": 0,
|
||||
"temp": 0,
|
||||
"serial": "",
|
||||
"partitions": [
|
||||
{
|
||||
"fstype": "ext4",
|
||||
"total_bytes": 1960000000000,
|
||||
"label": "Freebox",
|
||||
"id": 3000,
|
||||
"internal": false,
|
||||
"fsck_result": "no_run_yet",
|
||||
"state": "mounted",
|
||||
"disk_id": 3000,
|
||||
"free_bytes": 1730000000000,
|
||||
"used_bytes": 236910000000,
|
||||
"path": "L0ZyZWVib3g="
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
64
tests/components/freebox/fixtures/storage_get_raids.json
Normal file
64
tests/components/freebox/fixtures/storage_get_raids.json
Normal file
|
@ -0,0 +1,64 @@
|
|||
[
|
||||
{
|
||||
"degraded": false,
|
||||
"raid_disks": 2,
|
||||
"next_check": 0,
|
||||
"sync_action": "idle",
|
||||
"level": "raid1",
|
||||
"uuid": "dc8679f8-13f9-11ee-9106-38d547790df8",
|
||||
"sysfs_state": "clear",
|
||||
"id": 0,
|
||||
"sync_completed_pos": 0,
|
||||
"members": [
|
||||
{
|
||||
"total_bytes": 2000000000000,
|
||||
"active_device": 1,
|
||||
"id": 1000,
|
||||
"corrected_read_errors": 0,
|
||||
"array_id": 0,
|
||||
"disk": {
|
||||
"firmware": "0001",
|
||||
"temp": 29,
|
||||
"serial": "ZDZLBFHC",
|
||||
"model": "ST2000LM015-2E8174"
|
||||
},
|
||||
"role": "active",
|
||||
"sct_erc_supported": false,
|
||||
"sct_erc_enabled": false,
|
||||
"dev_uuid": "fca8720e-13f9-11ee-9106-38d547790df8",
|
||||
"device_location": "sata-internal-p2",
|
||||
"set_name": "Freebox",
|
||||
"set_uuid": "dc8679f8-13f9-11ee-9106-38d547790df8"
|
||||
},
|
||||
{
|
||||
"total_bytes": 2000000000000,
|
||||
"active_device": 0,
|
||||
"id": 2000,
|
||||
"corrected_read_errors": 0,
|
||||
"array_id": 0,
|
||||
"disk": {
|
||||
"firmware": "0001",
|
||||
"temp": 30,
|
||||
"serial": "ZDZLEJXE",
|
||||
"model": "ST2000LM015-2E8174"
|
||||
},
|
||||
"role": "active",
|
||||
"sct_erc_supported": false,
|
||||
"sct_erc_enabled": false,
|
||||
"dev_uuid": "16bf00d6-13fa-11ee-9106-38d547790df8",
|
||||
"device_location": "sata-internal-p0",
|
||||
"set_name": "Freebox",
|
||||
"set_uuid": "dc8679f8-13f9-11ee-9106-38d547790df8"
|
||||
}
|
||||
],
|
||||
"array_size": 2000000000000,
|
||||
"state": "running",
|
||||
"sync_speed": 0,
|
||||
"name": "Freebox",
|
||||
"check_interval": 0,
|
||||
"disk_id": 3000,
|
||||
"last_check": 1682884357,
|
||||
"sync_completed_end": 0,
|
||||
"sync_completed_percent": 0
|
||||
}
|
||||
]
|
57
tests/components/freebox/fixtures/system_get_config.json
Normal file
57
tests/components/freebox/fixtures/system_get_config.json
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"mac": "68:A3:78:00:00:00",
|
||||
"model_info": {
|
||||
"has_ext_telephony": true,
|
||||
"has_speakers_jack": true,
|
||||
"wifi_type": "2d4_5g",
|
||||
"pretty_name": "Freebox Server (r2)",
|
||||
"customer_hdd_slots": 0,
|
||||
"name": "fbxgw-r2/full",
|
||||
"has_speakers": true,
|
||||
"internal_hdd_size": 250,
|
||||
"has_femtocell_exp": true,
|
||||
"has_internal_hdd": true,
|
||||
"has_dect": true
|
||||
},
|
||||
"fans": [
|
||||
{
|
||||
"id": "fan0_speed",
|
||||
"name": "Ventilateur 1",
|
||||
"value": 2130
|
||||
}
|
||||
],
|
||||
"sensors": [
|
||||
{
|
||||
"id": "temp_hdd",
|
||||
"name": "Disque dur",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"id": "temp_hdd2",
|
||||
"name": "Disque dur 2"
|
||||
},
|
||||
{
|
||||
"id": "temp_sw",
|
||||
"name": "Température Switch",
|
||||
"value": 50
|
||||
},
|
||||
{
|
||||
"id": "temp_cpum",
|
||||
"name": "Température CPU M",
|
||||
"value": 60
|
||||
},
|
||||
{
|
||||
"id": "temp_cpub",
|
||||
"name": "Température CPU B",
|
||||
"value": 56
|
||||
}
|
||||
],
|
||||
"board_name": "fbxgw2r",
|
||||
"disk_status": "active",
|
||||
"uptime": "156 jours 19 heures 56 minutes 16 secondes",
|
||||
"uptime_val": 13550176,
|
||||
"user_main_storage": "Disque dur",
|
||||
"box_authenticated": true,
|
||||
"serial": "762601T190510709",
|
||||
"firmware_version": "4.2.5"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"enabled": true,
|
||||
"mac_filter_state": "disabled"
|
||||
}
|
Loading…
Add table
Reference in a new issue