Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a few unit tests for MSP protocol #3421

Merged
merged 2 commits into from
Apr 16, 2023

Conversation

Benky
Copy link
Contributor

@Benky Benky commented Apr 15, 2023

Description

This PR adds a few unit tests for MSP protocol (both V1 and V2). Operation code and data for tests are randomly generated.

@blckmn
Copy link
Member

blckmn commented Apr 15, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> FAIL
  • Tested label found -> FAIL
  • assigned to an approver -> FAIL
  • approver count at least three -> FAIL

@github-actions

This comment has been minimized.

@haslinghuis haslinghuis added this to the 10.10.0 milestone Apr 15, 2023
Copy link
Member

@haslinghuis haslinghuis left a comment

Choose a reason for hiding this comment

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

image

@sonarcloud
Copy link

sonarcloud bot commented Apr 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Benky
Copy link
Contributor Author

Benky commented Apr 16, 2023

Hey @haslinghuis - thanks for approval. I've removed usage of Math.random() to please SonarCloud (and it actually made a code a bit shorter).

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
Betaflight-Configurator-macOS
Betaflight-Configurator-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@nerdCopter
Copy link
Member

How do you execute a unit test? i couldn't find a gulp task.

@haslinghuis
Copy link
Member

yarn test

@haslinghuis haslinghuis merged commit 9d9edf9 into betaflight:master Apr 16, 2023
9 checks passed
@Benky Benky deleted the msp-unit-tests branch April 16, 2023 22:18
@chmelevskij
Copy link
Member

noice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

None yet

5 participants