test/src/util/test_util.cc
changeset 3277 fe1e94372261
parent 3254 6e7f6bc9460a
child 3279 011d5b2f231f
     1.1 --- a/test/src/util/test_util.cc	Wed Feb 06 13:47:13 2019 +0100
     1.2 +++ b/test/src/util/test_util.cc	Wed Feb 06 18:21:04 2019 +0100
     1.3 @@ -2,6 +2,7 @@
     1.4  #include "pEpEngine.h"
     1.5  #include "pEp_internal.h"
     1.6  #include "message_api.h"
     1.7 +#include "TestConstants.h"
     1.8  
     1.9  #include <fstream>
    1.10  #include <sstream>
    1.11 @@ -13,6 +14,7 @@
    1.12  #include <unistd.h>
    1.13  #include <ftw.h>
    1.14  
    1.15 +    if (status != PEP_TEST_KEY_IMPORT_SUCCESS)
    1.16  bool file_exists(std::string filename) {
    1.17      struct stat buffer;
    1.18      return (stat(filename.c_str(), &buffer) == 0);
    1.19 @@ -338,7 +340,7 @@
    1.20  
    1.21  bool slurp_and_import_key(PEP_SESSION session, const char* key_filename) {
    1.22      std::string keyfile = slurp(key_filename);
    1.23 -    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_KEY_IMPORTED)
    1.24 +    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_TEST_KEY_IMPORT_SUCCESS)
    1.25          return false;
    1.26      return true;
    1.27  }