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

[tests] wiring/acm: test-runner runnable ACM fixture test #2795

Merged
merged 5 commits into from
Sep 5, 2024

Conversation

scott-brust
Copy link
Member

@scott-brust scott-brust commented Jul 2, 2024

Problem

ACM related interfaces/features done have test coverage, we should add tests.

Solution

  • Test Network prefer() behavior
    • Test 2: When multiple networks are available, the one that is prefered should be used for the cloud connection
    • Test 3: Only one network can be preferred at at ime
    • Test 4: When multiple networks are available, and the cloud connection is on one, if the other is preferred, the cloud connection should move to that one as soon as possible
    • Test 5: If one network is available, and the unavailable network is preferred, if the preferred network becomes available, the cloud connection should move to that one as soon as possible
    • Test 6: If multiple networks are available, and the network being used for the cloud connection goes down, the cloud connection should be disconnected and reconnected immediately on the next best available network

Steps to Test

Run wiring/acm under test runner on M SoM (with Ethernet available). Requires a config with acm fixture device.

Test log

        acm: Initializing device test suite
        acm: Running device test: ACM_00_prepare_ethernet
        Device test notified about expected reset
        acm: Device test passed
        ✓ ACM_00_prepare_ethernet (10.4s)
        acm: Running device test: ACM_01_prepare
        acm: Device test passed
        ✓ ACM_01_prepare
        acm: Running device test: ACM_02_particle_connect_uses_preferred_wifi_network
        acm: Device test passed
        ✓ ACM_02_particle_connect_uses_preferred_wifi_network (12.3s)
        acm: Running device test: ACM_03_particle_connect_uses_preferred_cellular_network
        acm: Device test passed
        ✓ ACM_03_particle_connect_uses_preferred_cellular_network (10s)
        acm: Running device test: ACM_04_particle_connect_uses_preferred_ethernet_network
        acm: Device test passed
        ✓ ACM_04_particle_connect_uses_preferred_ethernet_network (3s)
        acm: Running device test: ACM_05_prefer_moves_cloud_connection_when_set_to_wifi
        acm: Device test passed
        ✓ ACM_05_prefer_moves_cloud_connection_when_set_to_wifi (46.3s)
        acm: Running device test: ACM_06_prefer_moves_cloud_connection_when_set_to_cellular
        acm: Device test passed
        ✓ ACM_06_prefer_moves_cloud_connection_when_set_to_cellular (33.9s)
        acm: Running device test: ACM_07_prefer_moves_cloud_connection_when_set_to_ethernet
        acm: Device test passed
        ✓ ACM_07_prefer_moves_cloud_connection_when_set_to_ethernet (33.9s)
        acm: Running device test: ACM_08_cloud_connection_moves_to_preferred_network_when_available_wifi
        acm: Device test passed
        ✓ ACM_08_cloud_connection_moves_to_preferred_network_when_available_wifi (38.2s)
        acm: Running device test: ACM_09_cloud_connection_moves_to_preferred_network_when_available_cellular
        acm: Device test passed
        ✓ ACM_09_cloud_connection_moves_to_preferred_network_when_available_cellular (135.2s)
        acm: Running device test: ACM_10_cloud_connection_moves_to_preferred_network_when_available_ethernet
        acm: Device test passed
        ✓ ACM_10_cloud_connection_moves_to_preferred_network_when_available_ethernet (36.3s)
        acm: Running device test: ACM_11_cloud_connection_fails_over_automatically_from_wifi_and_back
        acm: Device test passed
        ✓ ACM_11_cloud_connection_fails_over_automatically_from_wifi_and_back (66.4s)
        acm: Running device test: ACM_12_cloud_connection_fails_over_automatically_from_cellular_and_back
        acm: Device test passed
        ✓ ACM_12_cloud_connection_fails_over_automatically_from_cellular_and_back (56.3s)
        acm: Running device test: ACM_13_cloud_connection_fails_over_automatically_from_ethernet_and_back
        acm: Device test passed
        ✓ ACM_13_cloud_connection_fails_over_automatically_from_ethernet_and_back (49.4s)
        acm: Running device test: ACM_14_disable_ethernet
        Device test notified about expected reset
        acm: Device test passed
        ✓ ACM_14_disable_ethernet (5.1s)
        acm: Running device test: ACM_15_non_eth_prepare
        acm: Device test passed
        ✓ ACM_15_non_eth_prepare
        acm: Running device test: ACM_16_non_eth_particle_connect_uses_preferred_wifi_network
        acm: Device test passed
        ✓ ACM_16_non_eth_particle_connect_uses_preferred_wifi_network (10.6s)
        acm: Running device test: ACM_17_non_eth_particle_connect_uses_preferred_cellular_network
        acm: Device test passed
        ✓ ACM_17_non_eth_particle_connect_uses_preferred_cellular_network (9.4s)
        acm: Running device test: ACM_18_non_eth_prefer_moves_cloud_connection_when_set_to_wifi
        acm: Device test passed
        ✓ ACM_18_non_eth_prefer_moves_cloud_connection_when_set_to_wifi (52.2s)
        acm: Running device test: ACM_19_non_eth_prefer_moves_cloud_connection_when_set_to_cellular
        acm: Device test passed
        ✓ ACM_19_non_eth_prefer_moves_cloud_connection_when_set_to_cellular (33.2s)
        acm: Running device test: ACM_20_non_eth_cloud_connection_moves_to_preferred_network_when_available_wifi
        acm: Device test passed
        ✓ ACM_20_non_eth_cloud_connection_moves_to_preferred_network_when_available_wifi (39.3s)
        acm: Running device test: ACM_21_non_eth_cloud_connection_moves_to_preferred_network_when_available_cellular
        acm: Device test passed
        ✓ ACM_21_non_eth_cloud_connection_moves_to_preferred_network_when_available_cellular (135.5s)
        acm: Running device test: ACM_22_non_eth_cloud_connection_fails_over_automatically_from_wifi_and_back
        acm: Device test passed
        ✓ ACM_22_non_eth_cloud_connection_fails_over_automatically_from_wifi_and_back (53.7s)
        acm: Running device test: ACM_23_non_eth_cloud_connection_fails_over_automatically_from_cellular_and_back
        acm: Device test passed
        ✓ ACM_23_non_eth_cloud_connection_fails_over_automatically_from_cellular_and_back (98.2s)
        acm: Running device test: ACM_99_cleanup
        acm: Device test passed
        ✓ ACM_99_cleanup

References

Links to the Community, Docs, Other Issues, etc..


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@scott-brust scott-brust marked this pull request as ready for review July 2, 2024 21:06
system/src/system_connection_manager.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture/acm.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture/acm.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture/acm.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture/acm.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture/acm.cpp Outdated Show resolved Hide resolved
user/tests/wiring/no_fixture/acm.cpp Outdated Show resolved Hide resolved
@Kategrode Kategrode added this to the 5.9.0 milestone Aug 27, 2024
@avtolstoy avtolstoy changed the title [test] Add tests for ACM prefer feature, adjust logging [tests] wiring/acm: test-runner runnable ACM fixture test Sep 5, 2024
@avtolstoy avtolstoy requested a review from technobly September 5, 2024 17:01
@avtolstoy avtolstoy merged commit ac6e2ee into develop Sep 5, 2024
13 checks passed
@avtolstoy avtolstoy deleted the fix/add-acm-tests branch September 5, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants