Skip to content

Commit 253cb16

Browse files
tests: on_target: fix app fota test
Get latest bundle request is broken. Use hard-coded bundleID as solution. Signed-off-by: Giacomo Dematteis <[email protected]>
1 parent 88c17b8 commit 253cb16

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

tests/on_target/tests/test_functional/test_fota.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
MFW_202_FILEPATH = "artifacts/mfw_nrf91x1_2.0.2.zip"
1717
DELTA_MFW_BUNDLEID = "MODEM*3471f88e*mfw_nrf91x1_2.0.2-FOTA-TEST"
1818
FULL_MFW_BUNDLEID = "MDM_FULL*124c2b20*mfw_nrf91x1_full_2.0.2"
19+
APP_BUNDLEID = "APP*a82b7076*v2.0.1"
1920

2021
APP_FOTA_TIMEOUT = 60 * 10
2122
FULL_MFW_FOTA_TIMEOUT = 60 * 30
@@ -74,27 +75,14 @@ def _run_fota(bundleId, fota_type, fotatimeout=APP_FOTA_TIMEOUT, test_fota_resum
7475

7576
return _run_fota
7677

77-
def test_app_fota(t91x_fota, hex_file, run_fota_fixture):
78+
def test_app_fota(run_fota_fixture):
7879
'''
7980
Test application FOTA on nrf9151
8081
'''
81-
# Get latest APP fota bundle
82-
results = t91x_fota.fota.get_fota_bundles()
83-
if not results:
84-
pytest.fail("Failed to get APP FOTA bundles")
85-
available_bundles = results["bundles"]
86-
logger.debug(f"Number of available bundles: {len(available_bundles)}")
87-
app_bundles = [bundle for bundle in available_bundles if "APP" in bundle["bundleId"]]
88-
if not app_bundles:
89-
pytest.fail("No APP FOTA bundles found")
90-
latest_app_bundle = app_bundles[0]
82+
run_fota_fixture(bundleId=APP_BUNDLEID, fota_type="app", test_fota_resumption=True)
9183

92-
logger.debug(f"Latest APP bundle: {latest_app_bundle}")
9384

94-
run_fota_fixture(bundleId=latest_app_bundle["bundleId"], fota_type="app", test_fota_resumption=True)
95-
96-
97-
def test_delta_mfw_fota(t91x_board, hex_file, run_fota_fixture):
85+
def test_delta_mfw_fota(run_fota_fixture):
9886
'''
9987
Test delta modem FOTA on nrf9151
10088
'''
@@ -109,7 +97,7 @@ def test_delta_mfw_fota(t91x_board, hex_file, run_fota_fixture):
10997
flash_device(os.path.abspath(MFW_202_FILEPATH))
11098

11199
@pytest.mark.slow
112-
def test_full_mfw_fota(t91x_board, hex_file, run_fota_fixture):
100+
def test_full_mfw_fota(run_fota_fixture):
113101
'''
114102
Test full modem FOTA on nrf9151
115103
'''

0 commit comments

Comments
 (0)