Closed paulbartell closed 1 year ago
Can we expand the unit tests to catch this issue in the future?
Test output with the change....
ctest
Test project /home/ubuntu/ota-for-aws-iot-embedded-sdk/build
Start 1: ota_utest
1/4 Test #1: ota_utest ........................ Passed 0.02 sec
Start 2: ota_base64_utest
2/4 Test #2: ota_base64_utest ................. Passed 0.00 sec
Start 3: ota_cbor_utest
3/4 Test #3: ota_cbor_utest ................... Passed 0.00 sec
Start 4: ota_os_posix_utest
4/4 Test #4: ota_os_posix_utest ............... Passed 5.01 sec
100% tests passed, 0 tests failed out of 4
Test failure if I rollback the source change....
ctest
Test project /home/ubuntu/ota-for-aws-iot-embedded-sdk/build
Start 1: ota_utest
1/4 Test #1: ota_utest ........................***Failed 0.02 sec
Start 2: ota_base64_utest
2/4 Test #2: ota_base64_utest ................. Passed 0.00 sec
Start 3: ota_cbor_utest
3/4 Test #3: ota_cbor_utest ................... Passed 0.00 sec
Start 4: ota_os_posix_utest
4/4 Test #4: ota_os_posix_utest ............... Passed 5.01 sec
75% tests passed, 1 tests failed out of 4
Total Test time (real) = 5.03 sec
The following tests FAILED:
1 - ota_utest (Failed)
The logs show the failed expectation.../home/ubuntu/ota-for-aws-iot-embedded-sdk/test/unit-test/ota_utest.c:490:test_OTA_MQTT_PublishesToCorrectTopic:FAIL: Expected '$aws/things/ota_utest/jobs/$next/get' Was '$aws/things/'
FIX: Invalid topic used to publish request for outstanding OTA jobs
Description
From the original poster @imoir:
fix #480
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.