eclipse-hono / hono

Eclipse Hono™ Project
https://eclipse.dev/hono
Eclipse Public License 2.0
453 stars 137 forks source link

[#3608] Verify that auto-provisioned device ids match device id pattern #3641

Closed harism closed 5 months ago

harism commented 6 months ago

This is initial implementation idea I had and thought it should cover all the paths device is created to prevent creating any deivce with id which does not conform to the device id pattern.

I think I need to look at integration tests also but need to do that bit later.

harism commented 5 months ago

I added integration test for assertRegistration to verify that assertion fails with invalid device id. But do you consider this is enough for integration tests and rely on it that all adapters do call assertRegistration and this will cover all adapter uses where using via gateway it has been possible to have invalid device id?

If not I will continue writing per adapter integration tests in a similar fashion too.