Adjusted test to check DB status ENGINE-358
authorKrista Bennett <krista@pep-project.org>
Wed, 17 Oct 2018 08:35:04 +0200
branchENGINE-358
changeset 3065bf6c61e61645
parent 3064 186106cf0439
child 3066 65ef79fbac81
Adjusted test to check DB status
test/src/SuiteMaker.cc
test/src/engine_tests/Engine463Tests.cc
     1.1 --- a/test/src/SuiteMaker.cc	Tue Oct 16 12:41:19 2018 +0200
     1.2 +++ b/test/src/SuiteMaker.cc	Wed Oct 17 08:35:04 2018 +0200
     1.3 @@ -24,6 +24,7 @@
     1.4  #include "DecryptAttachPrivateKeyUntrustedTests.h"
     1.5  #include "BCCTests.h"
     1.6  #include "LeastColorGroupTests.h"
     1.7 +#include "Engine358Tests.h"
     1.8  #include "MistrustUndoTests.h"
     1.9  #include "BlacklistAcceptNewKeyTests.h"
    1.10  #include "MessageApiTests.h"
    1.11 @@ -67,6 +68,7 @@
    1.12      "DecryptAttachPrivateKeyUntrustedTests",
    1.13      "BCCTests",
    1.14      "LeastColorGroupTests",
    1.15 +    "Engine358Tests",
    1.16      "MistrustUndoTests",
    1.17      "BlacklistAcceptNewKeyTests",
    1.18      "MessageApiTests",
    1.19 @@ -98,7 +100,7 @@
    1.20  };
    1.21  
    1.22  // This file is generated, so magic constants are ok.
    1.23 -int SuiteMaker::num_suites = 40;
    1.24 +int SuiteMaker::num_suites = 41;
    1.25  
    1.26  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
    1.27      if (strcmp(test_class_name, "DecorateTests") == 0)
    1.28 @@ -125,6 +127,8 @@
    1.29          *test_suite = new BCCTests(test_class_name, test_home);
    1.30      else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
    1.31          *test_suite = new LeastColorGroupTests(test_class_name, test_home);
    1.32 +    else if (strcmp(test_class_name, "Engine358Tests") == 0)
    1.33 +        *test_suite = new Engine358Tests(test_class_name, test_home);
    1.34      else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
    1.35          *test_suite = new MistrustUndoTests(test_class_name, test_home);
    1.36      else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
     2.1 --- a/test/src/engine_tests/Engine463Tests.cc	Tue Oct 16 12:41:19 2018 +0200
     2.2 +++ b/test/src/engine_tests/Engine463Tests.cc	Wed Oct 17 08:35:04 2018 +0200
     2.3 @@ -150,12 +150,22 @@
     2.4      status = MIME_decrypt_message(session, msg.c_str(), msg.size(), &decrypted_msg, &keylist_used, &rating, &flags, &modified_src);
     2.5      TEST_ASSERT_MSG((status == PEP_DECRYPTED), tl_status_string(status));
     2.6  
     2.7 +    pEp_identity* expired_inquisitor = new_identity("inquisitor@darthmama.org", NULL, NULL, "Lady Claire Trevelyan");
     2.8 +    pEp_identity* expired_inquisitor2 = identity_dup(expired_inquisitor);
     2.9 +
    2.10 +    expired_inquisitor2->user_id = strdup("TOFU_inquisitor@darthmama.org");
    2.11 +    expired_inquisitor2->fpr = strdup("8E8D2381AE066ABE1FEE509821BA977CA4728718");
    2.12 +    status = get_trust(session, expired_inquisitor2);
    2.13 +    cout << tl_ct_string(expired_inquisitor2->comm_type) << endl;
    2.14 +
    2.15      free(decrypted_msg);
    2.16      decrypted_msg = NULL;
    2.17      ok = slurp_and_import_key(session, "test_keys/pub/inquisitor-0xA4728718_renewed_pub.asc");    
    2.18      TEST_ASSERT(ok);    
    2.19  
    2.20 -    pEp_identity* expired_inquisitor = new_identity("inquisitor@darthmama.org", NULL, NULL, "Lady Claire Trevelyan");
    2.21 +    status = get_trust(session, expired_inquisitor2);
    2.22 +    cout << tl_ct_string(expired_inquisitor2->comm_type) << endl;
    2.23 +
    2.24      message* msg2 = new_message(PEP_dir_outgoing);    
    2.25  
    2.26      msg2->from = alice_from;