Skip to content

Commit 5f0038a

Browse files
committed
Merging existing options with min_api_version
1 parent 09c0044 commit 5f0038a

149 files changed

Lines changed: 711 additions & 1152 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/SmartThings/matter-appliance/src/test/test_extractor_hood.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,9 @@ test.register_coroutine_test(
664664
mock_device_onoff:expect_metadata_update({ profile = "extractor-hood-wind-light" })
665665
mock_device_onoff:expect_metadata_update({ provisioning_state = "PROVISIONED" })
666666
end,
667-
{ test_init = test_init_onoff },
668667
{
669-
min_api_version = 19
668+
test_init = test_init_onoff,
669+
min_api_version = 19
670670
}
671671
)
672672

@@ -690,9 +690,9 @@ test.register_coroutine_test(
690690
clusters.OnOff.server.commands.Off(mock_device_onoff, 2)
691691
})
692692
end,
693-
{ test_init = test_init_onoff },
694693
{
695-
min_api_version = 19
694+
test_init = test_init_onoff,
695+
min_api_version = 19
696696
}
697697
)
698698

@@ -714,9 +714,9 @@ test.register_coroutine_test(
714714
mock_device_onoff:generate_test_message("light", capabilities.switch.switch.off())
715715
)
716716
end,
717-
{ test_init = test_init_onoff },
718717
{
719-
min_api_version = 19
718+
test_init = test_init_onoff,
719+
min_api_version = 19
720720
}
721721
)
722722

drivers/SmartThings/matter-appliance/src/test/test_matter_appliance_rpc_5.lua

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ test.register_coroutine_test(
456456
{ mock_device_dishwasher.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_dishwasher, dishwasher_ep, 40 * 100, nil) }
457457
)
458458
end,
459-
{ test_init = test_init_dishwasher },
460459
{
461-
min_api_version = 19
460+
test_init = test_init_dishwasher,
461+
min_api_version = 19
462462
}
463463
)
464464

@@ -498,9 +498,9 @@ test.register_coroutine_test(
498498
{ mock_device_dishwasher.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_dishwasher, dishwasher_ep, 50 * 100, nil) }
499499
)
500500
end,
501-
{ test_init = test_init_dishwasher },
502501
{
503-
min_api_version = 19
502+
test_init = test_init_dishwasher,
503+
min_api_version = 19
504504
}
505505
)
506506

@@ -540,9 +540,9 @@ test.register_coroutine_test(
540540
{ mock_device_washer.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_washer, washer_ep, 28 * 100, nil) }
541541
)
542542
end,
543-
{ test_init = test_init_washer },
544543
{
545-
min_api_version = 19
544+
test_init = test_init_washer,
545+
min_api_version = 19
546546
}
547547
)
548548

@@ -582,9 +582,9 @@ test.register_coroutine_test(
582582
{ mock_device_washer.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_washer, washer_ep, 50 * 100, nil) }
583583
)
584584
end,
585-
{ test_init = test_init_washer },
586585
{
587-
min_api_version = 19
586+
test_init = test_init_washer,
587+
min_api_version = 19
588588
}
589589
)
590590

@@ -624,9 +624,9 @@ test.register_coroutine_test(
624624
{ mock_device_dryer.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_dryer, dryer_ep, 40 * 100, nil) }
625625
)
626626
end,
627-
{ test_init = test_init_dryer },
628627
{
629-
min_api_version = 19
628+
test_init = test_init_dryer,
629+
min_api_version = 19
630630
}
631631
)
632632

@@ -666,9 +666,9 @@ test.register_coroutine_test(
666666
{ mock_device_dryer.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_dryer, dryer_ep, 40 * 100, nil) }
667667
)
668668
end,
669-
{ test_init = test_init_dryer },
670669
{
671-
min_api_version = 19
670+
test_init = test_init_dryer,
671+
min_api_version = 19
672672
}
673673
)
674674

@@ -708,9 +708,9 @@ test.register_coroutine_test(
708708
{ mock_device_oven.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_oven, oven_tcc_one_ep, 140 * 100, nil) }
709709
)
710710
end,
711-
{ test_init = test_init_oven },
712711
{
713-
min_api_version = 19
712+
test_init = test_init_oven,
713+
min_api_version = 19
714714
}
715715
)
716716

@@ -750,9 +750,9 @@ test.register_coroutine_test(
750750
{ mock_device_oven.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_oven, oven_tcc_one_ep, 140 * 100, nil) }
751751
)
752752
end,
753-
{ test_init = test_init_oven },
754753
{
755-
min_api_version = 19
754+
test_init = test_init_oven,
755+
min_api_version = 19
756756
}
757757
)
758758

@@ -792,9 +792,9 @@ test.register_coroutine_test(
792792
{ mock_device_refrigerator.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_refrigerator, refrigerator_ep, 4 * 100, nil) }
793793
)
794794
end,
795-
{ test_init = test_init_refrigerator },
796795
{
797-
min_api_version = 19
796+
test_init = test_init_refrigerator,
797+
min_api_version = 19
798798
}
799799
)
800800

@@ -834,9 +834,9 @@ test.register_coroutine_test(
834834
{ mock_device_refrigerator.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_refrigerator, refrigerator_ep, 10 * 100, nil) }
835835
)
836836
end,
837-
{ test_init = test_init_refrigerator },
838837
{
839-
min_api_version = 19
838+
test_init = test_init_refrigerator,
839+
min_api_version = 19
840840
}
841841
)
842842

@@ -876,9 +876,9 @@ test.register_coroutine_test(
876876
{ mock_device_refrigerator.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_refrigerator, freezer_ep, -15 * 100, nil) }
877877
)
878878
end,
879-
{ test_init = test_init_refrigerator },
880879
{
881-
min_api_version = 19
880+
test_init = test_init_refrigerator,
881+
min_api_version = 19
882882
}
883883
)
884884

@@ -918,9 +918,9 @@ test.register_coroutine_test(
918918
{ mock_device_refrigerator.id, clusters.TemperatureControl.commands.SetTemperature(mock_device_refrigerator, freezer_ep, -20 * 100, nil) }
919919
)
920920
end,
921-
{ test_init = test_init_refrigerator },
922921
{
923-
min_api_version = 19
922+
test_init = test_init_refrigerator,
923+
min_api_version = 19
924924
}
925925
)
926926

drivers/SmartThings/matter-appliance/src/test/test_microwave_oven.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,8 @@ test.register_message_test(
257257
test_init = function()
258258
test_init()
259259
init_supported_microwave_oven_modes()
260-
end
261-
},
262-
{
263-
min_api_version = 19
260+
end,
261+
min_api_version = 19
264262
}
265263
)
266264

drivers/SmartThings/matter-appliance/src/test/test_oven.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ test.register_message_test(
204204
clusters.OvenMode.commands.ChangeToMode(mock_device, OVEN_TCC_ONE_ENDPOINT, 0) --Index where Grill is stored)
205205
}
206206
}
207+
},
208+
{
209+
min_api_version = 19
207210
}
208211
)
209212

drivers/SmartThings/matter-energy/src/test/test_battery_storage.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,8 @@ test.register_coroutine_test(
300300
{
301301
test_init = function()
302302
test_init()
303-
end
304-
},
305-
{
306-
min_api_version = 19
303+
end,
304+
min_api_version = 19
307305
}
308306
)
309307

drivers/SmartThings/matter-energy/src/test/test_evse_energy_meas.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ test.register_coroutine_test(
151151
{
152152
test_init = function()
153153
test_init()
154-
end
155-
},
156-
{
157-
min_api_version = 19
154+
end,
155+
min_api_version = 19
158156
}
159157
)
160158

drivers/SmartThings/matter-energy/src/test/test_solar_power.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,8 @@ test.register_coroutine_test(
171171
{
172172
test_init = function()
173173
test_init()
174-
end
175-
},
176-
{
177-
min_api_version = 19
174+
end,
175+
min_api_version = 19
178176
}
179177
)
180178

drivers/SmartThings/matter-lock/src/test/test_matter_lock_battery.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ test.register_coroutine_test(
157157
"Test that profile changes to base-lock-no-battery when battery feature is not available",
158158
function()
159159
end,
160-
{ test_init = test_init_no_battery },
161160
{
162-
min_api_version = 19
161+
test_init = test_init_no_battery,
162+
min_api_version = 19
163163
}
164164
)
165165
test.run_registered_tests()

drivers/SmartThings/matter-lock/src/test/test_matter_lock_modular.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ test.register_coroutine_test(
452452
)
453453
mock_device_unlatch:expect_metadata_update({ profile = "lock-modular-embedded-unlatch", optional_component_capabilities = {{"main", {}}} })
454454
end,
455-
{ test_init = test_init_unlatch },
456455
{
457-
min_api_version = 19
456+
test_init = test_init_unlatch,
457+
min_api_version = 19
458458
}
459459
)
460460

@@ -487,9 +487,9 @@ test.register_coroutine_test(
487487
)
488488
mock_device_unlatch:expect_metadata_update({ profile = "lock-modular-embedded-unlatch", optional_component_capabilities = {{"main", {"batteryLevel"}}} })
489489
end,
490-
{ test_init = test_init_unlatch },
491490
{
492-
min_api_version = 19
491+
test_init = test_init_unlatch,
492+
min_api_version = 19
493493
}
494494
)
495495

@@ -523,9 +523,9 @@ test.register_coroutine_test(
523523
)
524524
mock_device_unlatch:expect_metadata_update({ profile = "lock-modular-embedded-unlatch", optional_component_capabilities = {{"main", {"battery"}}} })
525525
end,
526-
{ test_init = test_init_unlatch },
527526
{
528-
min_api_version = 19
527+
test_init = test_init_unlatch,
528+
min_api_version = 19
529529
}
530530
)
531531

@@ -559,9 +559,9 @@ test.register_coroutine_test(
559559
)
560560
mock_device_user_pin:expect_metadata_update({ profile = "lock-modular", optional_component_capabilities = {{"main", {"lockUsers", "lockCredentials", "battery"}}} })
561561
end,
562-
{ test_init = test_init_user_pin },
563562
{
564-
min_api_version = 19
563+
test_init = test_init_user_pin,
564+
min_api_version = 19
565565
}
566566
)
567567

@@ -596,9 +596,9 @@ test.register_coroutine_test(
596596
mock_device_user_pin_schedule_unlatch:expect_metadata_update({ profile = "lock-modular-embedded-unlatch", optional_component_capabilities = {{"main", {"lockUsers", "lockCredentials", "lockSchedules", "battery"}}} })
597597

598598
end,
599-
{ test_init = test_init_user_pin_schedule_unlatch },
600599
{
601-
min_api_version = 19
600+
test_init = test_init_user_pin_schedule_unlatch,
601+
min_api_version = 19
602602
}
603603
)
604604

@@ -662,9 +662,9 @@ test.register_coroutine_test(
662662
mock_device_modular:generate_test_message("main", capabilities.lockAlarm.supportedAlarmValues({"unableToLockTheDoor"}, {visibility = {displayed = false}}))
663663
)
664664
end,
665-
{ test_init = test_init_modular },
666665
{
667-
min_api_version = 19
666+
test_init = test_init_modular,
667+
min_api_version = 19
668668
}
669669
)
670670

0 commit comments

Comments
 (0)