Tests for ENGINE-527 (checks on username)
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Wed, 20 Mar 2019 15:25:24 +0100
changeset 33501c117fa0df8e
parent 3349 4320b0f44436
child 3351 b9c0efacb652
Tests for ENGINE-527 (checks on username)
src/pEpEngine.c
test/src/SuiteMaker.cc
     1.1 --- a/src/pEpEngine.c	Wed Mar 20 12:21:38 2019 +0100
     1.2 +++ b/src/pEpEngine.c	Wed Mar 20 15:25:24 2019 +0100
     1.3 @@ -79,6 +79,7 @@
     1.4      "select id, word from wordlist where lang = lower(?1) "
     1.5      "and id = ?2 ;";
     1.6  
     1.7 +// FIXME?: problems if we don't have a key for the user - we get nothing
     1.8  static const char *sql_get_identity =  
     1.9      "select fpr, username, comm_type, lang,"
    1.10      "   identity.flags | pgp_keypair.flags,"
     2.1 --- a/test/src/SuiteMaker.cc	Wed Mar 20 12:21:38 2019 +0100
     2.2 +++ b/test/src/SuiteMaker.cc	Wed Mar 20 15:25:24 2019 +0100
     2.3 @@ -18,6 +18,7 @@
     2.4  #include "Engine463Tests.h"
     2.5  #include "BloblistTests.h"
     2.6  #include "NewUpdateIdAndMyselfTests.h"
     2.7 +#include "NoOwnIdentWritesOnDecryptTests.h"
     2.8  #include "I18nTests.h"
     2.9  #include "IdentityListTests.h"
    2.10  #include "PgpBinaryTests.h"
    2.11 @@ -67,6 +68,7 @@
    2.12      "Engine463Tests",
    2.13      "BloblistTests",
    2.14      "NewUpdateIdAndMyselfTests",
    2.15 +    "NoOwnIdentWritesOnDecryptTests",
    2.16      "I18nTests",
    2.17      "IdentityListTests",
    2.18      "PgpBinaryTests",
    2.19 @@ -110,7 +112,7 @@
    2.20  };
    2.21  
    2.22  // This file is generated, so magic constants are ok.
    2.23 -int SuiteMaker::num_suites = 46;
    2.24 +int SuiteMaker::num_suites = 47;
    2.25  
    2.26  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
    2.27      if (strcmp(test_class_name, "MimeTests") == 0)
    2.28 @@ -125,6 +127,8 @@
    2.29          *test_suite = new BloblistTests(test_class_name, test_home);
    2.30      else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
    2.31          *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
    2.32 +    else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
    2.33 +        *test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
    2.34      else if (strcmp(test_class_name, "I18nTests") == 0)
    2.35          *test_suite = new I18nTests(test_class_name, test_home);
    2.36      else if (strcmp(test_class_name, "IdentityListTests") == 0)