Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Conversation

@pippolo84
Copy link

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

@pippolo84 pippolo84 self-assigned this Sep 25, 2020
@pippolo84 pippolo84 marked this pull request as draft September 25, 2020 09:16
Fabio Falzoi added 2 commits October 2, 2020 15:25
Signed-off-by: Fabio Falzoi <fabio@develer.com>
Signed-off-by: Fabio Falzoi <fabio@develer.com>
Signed-off-by: Federico Guerinoni <guerra@develer.com>
@guerinoni guerinoni marked this pull request as ready for review October 2, 2020 13:40
@guerinoni guerinoni requested review from guerinoni and rsora October 2, 2020 13:40
Signed-off-by: Federico Guerinoni <guerra@develer.com>
@guerinoni guerinoni force-pushed the installation-tests branch 2 times, most recently from 1ea3e2f to cf2b878 Compare October 3, 2020 08:42
Federico Guerinoni added 2 commits October 3, 2020 10:47
Signed-off-by: Federico Guerinoni <guerra@develer.com>
Signed-off-by: Federico Guerinoni <guerra@develer.com>
Copy link
Contributor

@guerinoni guerinoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pippolo84 pippolo84 merged commit b083a84 into master Oct 5, 2020
@pippolo84 pippolo84 deleted the installation-tests branch October 5, 2020 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants