Skip to content

Commit

Permalink
fix(test): Reset trust list for each test case
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelGraf committed Jan 15, 2025
1 parent b025293 commit 7a4d1d5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/encryption/check_update_trustlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ static void setup2(void) {
server =
UA_Server_newForUnitTestWithSecurityPolicies_Filestore(4840, &certificate,
&privateKey, storePath);

/* Reset the trust list for each test case.
* This is necessary so that all of the old certificates
* from previous test cases are deleted from the PKI file store */
UA_TrustListDataType trustList;
UA_TrustListDataType_init(&trustList);
trustList.specifiedLists = UA_TRUSTLISTMASKS_ALL;
server->config.secureChannelPKI.setTrustList(&server->config.secureChannelPKI, &trustList);
UA_TrustListDataType_clear(&trustList);

ck_assert(server != NULL);
}
#endif /* defined(__linux__) || defined(UA_ARCHITECTURE_WIN32) */
Expand Down

0 comments on commit 7a4d1d5

Please sign in to comment.