Skip to content

Commit c79d40e

Browse files
authored
Merge pull request #1813 from ArielSAdamsNASA/fix-1786-success-test-cfe_es_restartapp
Fix #1786, Success Test for CFE_ES_RestartApp
2 parents 49a5db1 + 901f135 commit c79d40e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/es/ut-coverage/es_UT.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,6 +3526,12 @@ void TestAPI(void)
35263526
AppId = CFE_ES_APPID_C(ES_UT_MakeAppIdForIndex(99999));
35273527
UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_ES_ERR_RESOURCEID_NOT_VALID);
35283528

3529+
/* Test successfully restarting an app */
3530+
ES_ResetUnitTest();
3531+
ES_UT_SetupSingleAppId(CFE_ES_AppType_EXTERNAL, CFE_ES_AppState_RUNNING, NULL, &UtAppRecPtr, NULL);
3532+
AppId = CFE_ES_AppRecordGetID(UtAppRecPtr);
3533+
UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_SUCCESS);
3534+
35293535
/* Test CFE_ES_ReloadApp with bad AppID argument */
35303536
ES_ResetUnitTest();
35313537
UtAssert_INT32_EQ(CFE_ES_ReloadApp(CFE_ES_APPID_UNDEFINED, "filename"), CFE_ES_ERR_RESOURCEID_NOT_VALID);

0 commit comments

Comments
 (0)