Skip to content

Commit

Permalink
Merge pull request #1813 from ArielSAdamsNASA/fix-1786-success-test-c…
Browse files Browse the repository at this point in the history
…fe_es_restartapp

Fix #1786, Success Test for CFE_ES_RestartApp
  • Loading branch information
astrogeco authored Aug 20, 2021
2 parents 49a5db1 + 901f135 commit c79d40e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/es/ut-coverage/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -3526,6 +3526,12 @@ void TestAPI(void)
AppId = CFE_ES_APPID_C(ES_UT_MakeAppIdForIndex(99999));
UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_ES_ERR_RESOURCEID_NOT_VALID);

/* Test successfully restarting an app */
ES_ResetUnitTest();
ES_UT_SetupSingleAppId(CFE_ES_AppType_EXTERNAL, CFE_ES_AppState_RUNNING, NULL, &UtAppRecPtr, NULL);
AppId = CFE_ES_AppRecordGetID(UtAppRecPtr);
UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_SUCCESS);

/* Test CFE_ES_ReloadApp with bad AppID argument */
ES_ResetUnitTest();
UtAssert_INT32_EQ(CFE_ES_ReloadApp(CFE_ES_APPID_UNDEFINED, "filename"), CFE_ES_ERR_RESOURCEID_NOT_VALID);
Expand Down

0 comments on commit c79d40e

Please sign in to comment.