The purpose of this PR is to introduce some tests to verify the registering and installation process of arduino-connector, without interacting with the real AWS API endpoints.
Regarding the TestRegister test, the following approach is used:
create and install a custom Certificate Authority
generate a server certificate for mosquitto
generate a client certificate to subscribe to mosquitto and check what arduino-connector is publishing
configure mosquitto to reject unauthenticated connections
mock the OAuth server to be able to verify the token-based authentication flow
mock the AWS API servers, to be able to check the Certificate Signing Request and send back a certificate built for this test
run the register function
check that arduino-connector is:
connecting to the broker using the generated certificate
publishing the correct information to the /register topic
The purpose of this PR is to introduce some tests to verify the registering and installation process of
arduino-connector
, without interacting with the real AWS API endpoints.Regarding the
TestRegister
test, the following approach is used:mosquitto
mosquitto
and check whatarduino-connector
is publishingmosquitto
to reject unauthenticated connectionsregister
functionarduino-connector
is:/register
topic