do not test management param sync
authorVolker Birk <vb@pep.foundation>
Thu, 04 Oct 2018 17:43:08 +0200
branchsync
changeset 299215e45b39c38c
parent 2983 513f7ae0897b
child 2996 774563a13944
child 3001 8c1aafb3ad57
do not test management param
src/sync_api.c
test/include/KeyResetMessageTests.h
test/src/SuiteMaker.cc
test/src/engine_tests/KeyResetMessageTests.cc
     1.1 --- a/src/sync_api.c	Thu Oct 04 09:40:44 2018 +0200
     1.2 +++ b/src/sync_api.c	Thu Oct 04 17:43:08 2018 +0200
     1.3 @@ -15,8 +15,8 @@
     1.4          retrieve_next_sync_event_t retrieve_next_sync_event
     1.5      )
     1.6  {
     1.7 -    assert(session && management && notifyHandshake && retrieve_next_sync_event);
     1.8 -    if (!(session && management && notifyHandshake && retrieve_next_sync_event))
     1.9 +    assert(session && notifyHandshake && retrieve_next_sync_event);
    1.10 +    if (!(session && notifyHandshake && retrieve_next_sync_event))
    1.11          return PEP_ILLEGAL_VALUE;
    1.12  
    1.13      session->sync_management = management;
     2.1 --- a/test/include/KeyResetMessageTests.h	Thu Oct 04 09:40:44 2018 +0200
     2.2 +++ b/test/include/KeyResetMessageTests.h	Thu Oct 04 17:43:08 2018 +0200
     2.3 @@ -7,6 +7,7 @@
     2.4  #include <string>
     2.5  #include "EngineTestIndividualSuite.h"
     2.6  #include "pEpEngine.h"
     2.7 +#include "message.h"
     2.8  
     2.9  using namespace std;
    2.10  
     3.1 --- a/test/src/SuiteMaker.cc	Thu Oct 04 09:40:44 2018 +0200
     3.2 +++ b/test/src/SuiteMaker.cc	Thu Oct 04 17:43:08 2018 +0200
     3.3 @@ -12,167 +12,167 @@
     3.4  #include "SuiteMaker.h"
     3.5  
     3.6  // Begin where we generate stuff
     3.7 +#include "MimeTests.h"
     3.8 +#include "BloblistTests.h"
     3.9 +#include "NewUpdateIdAndMyselfTests.h"
    3.10 +#include "I18nTests.h"
    3.11 +#include "IdentityListTests.h"
    3.12 +#include "PgpBinaryTests.h"
    3.13 +#include "MessageNullFromTests.h"
    3.14 +#include "LeastCommonDenomColorTests.h"
    3.15 +#include "StringlistTests.h"
    3.16 +#include "PgpListKeysTests.h"
    3.17 +#include "MessageApiTests.h"
    3.18 +#include "EncryptMissingPrivateKeyTests.h"
    3.19 +#include "CaseAndDotAddressTests.h"
    3.20 +#include "UserIDAliasTests.h"
    3.21 +#include "BCCTests.h"
    3.22 +#include "BlacklistAcceptNewKeyTests.h"
    3.23 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    3.24 +#include "BlacklistTests.h"
    3.25 +#include "RevokeRegenAttachTests.h"
    3.26 +#include "PepSubjectReceivedTests.h"
    3.27 +#include "SequenceTests.h"
    3.28 +#include "EncryptAttachPrivateKeyTests.h"
    3.29 +#include "ExternalRevokeTests.h"
    3.30 +#include "KeyeditTests.h"
    3.31 +#include "LeastColorGroupTests.h"
    3.32 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    3.33 +#include "TrustwordsTests.h"
    3.34 +#include "ReencryptPlusExtraKeysTests.h"
    3.35 +#include "MapAsn1Tests.h"
    3.36  #include "DecorateTests.h"
    3.37 -#include "ReencryptPlusExtraKeysTests.h"
    3.38 -#include "BlacklistTests.h"
    3.39 -#include "AppleMailTests.h"
    3.40  #include "MessageTwoPointOhTests.h"
    3.41 -#include "IdentityListTests.h"
    3.42 -#include "I18nTests.h"
    3.43 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    3.44 -#include "BCCTests.h"
    3.45 -#include "LeastColorGroupTests.h"
    3.46 -#include "BlacklistAcceptNewKeyTests.h"
    3.47 -#include "MessageApiTests.h"
    3.48 -#include "StringlistTests.h"
    3.49 +#include "CrashdumpTests.h"
    3.50  #include "StringpairListTests.h"
    3.51 +#include "EncryptForIdentityTests.h"
    3.52 +#include "KeyResetMessageTests.h"
    3.53  #include "TrustManipulationTests.h"
    3.54  #include "SyncTests.h"
    3.55 -#include "EncryptAttachPrivateKeyTests.h"
    3.56 -#include "BloblistTests.h"
    3.57 -#include "KeyResetMessageTests.h"
    3.58 -#include "SequenceTests.h"
    3.59 -#include "TrustwordsTests.h"
    3.60 -#include "RevokeRegenAttachTests.h"
    3.61 -#include "EncryptMissingPrivateKeyTests.h"
    3.62 -#include "PepSubjectReceivedTests.h"
    3.63 -#include "KeyeditTests.h"
    3.64 -#include "MapAsn1Tests.h"
    3.65 -#include "PgpBinaryTests.h"
    3.66 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    3.67 -#include "MessageNullFromTests.h"
    3.68 -#include "MimeTests.h"
    3.69 -#include "PgpListKeysTests.h"
    3.70 -#include "NewUpdateIdAndMyselfTests.h"
    3.71 -#include "EncryptForIdentityTests.h"
    3.72 -#include "CrashdumpTests.h"
    3.73 -#include "CaseAndDotAddressTests.h"
    3.74 -#include "LeastCommonDenomColorTests.h"
    3.75 -#include "ExternalRevokeTests.h"
    3.76 -#include "UserIDAliasTests.h"
    3.77 +#include "AppleMailTests.h"
    3.78  
    3.79  
    3.80  const char* SuiteMaker::all_suites[] = {
    3.81 +    "MimeTests",
    3.82 +    "BloblistTests",
    3.83 +    "NewUpdateIdAndMyselfTests",
    3.84 +    "I18nTests",
    3.85 +    "IdentityListTests",
    3.86 +    "PgpBinaryTests",
    3.87 +    "MessageNullFromTests",
    3.88 +    "LeastCommonDenomColorTests",
    3.89 +    "StringlistTests",
    3.90 +    "PgpListKeysTests",
    3.91 +    "MessageApiTests",
    3.92 +    "EncryptMissingPrivateKeyTests",
    3.93 +    "CaseAndDotAddressTests",
    3.94 +    "UserIDAliasTests",
    3.95 +    "BCCTests",
    3.96 +    "BlacklistAcceptNewKeyTests",
    3.97 +    "DecryptAttachPrivateKeyUntrustedTests",
    3.98 +    "BlacklistTests",
    3.99 +    "RevokeRegenAttachTests",
   3.100 +    "PepSubjectReceivedTests",
   3.101 +    "SequenceTests",
   3.102 +    "EncryptAttachPrivateKeyTests",
   3.103 +    "ExternalRevokeTests",
   3.104 +    "KeyeditTests",
   3.105 +    "LeastColorGroupTests",
   3.106 +    "DecryptAttachPrivateKeyTrustedTests",
   3.107 +    "TrustwordsTests",
   3.108 +    "ReencryptPlusExtraKeysTests",
   3.109 +    "MapAsn1Tests",
   3.110      "DecorateTests",
   3.111 -    "ReencryptPlusExtraKeysTests",
   3.112 -    "BlacklistTests",
   3.113 -    "AppleMailTests",
   3.114      "MessageTwoPointOhTests",
   3.115 -    "IdentityListTests",
   3.116 -    "I18nTests",
   3.117 -    "DecryptAttachPrivateKeyUntrustedTests",
   3.118 -    "BCCTests",
   3.119 -    "LeastColorGroupTests",
   3.120 -    "BlacklistAcceptNewKeyTests",
   3.121 -    "MessageApiTests",
   3.122 -    "StringlistTests",
   3.123 +    "CrashdumpTests",
   3.124      "StringpairListTests",
   3.125 +    "EncryptForIdentityTests",
   3.126 +    "KeyResetMessageTests",
   3.127      "TrustManipulationTests",
   3.128      "SyncTests",
   3.129 -    "EncryptAttachPrivateKeyTests",
   3.130 -    "BloblistTests",
   3.131 -    "KeyResetMessageTests",
   3.132 -    "SequenceTests",
   3.133 -    "TrustwordsTests",
   3.134 -    "RevokeRegenAttachTests",
   3.135 -    "EncryptMissingPrivateKeyTests",
   3.136 -    "PepSubjectReceivedTests",
   3.137 -    "KeyeditTests",
   3.138 -    "MapAsn1Tests",
   3.139 -    "PgpBinaryTests",
   3.140 -    "DecryptAttachPrivateKeyTrustedTests",
   3.141 -    "MessageNullFromTests",
   3.142 -    "MimeTests",
   3.143 -    "PgpListKeysTests",
   3.144 -    "NewUpdateIdAndMyselfTests",
   3.145 -    "EncryptForIdentityTests",
   3.146 -    "CrashdumpTests",
   3.147 -    "CaseAndDotAddressTests",
   3.148 -    "LeastCommonDenomColorTests",
   3.149 -    "ExternalRevokeTests",
   3.150 -    "UserIDAliasTests",
   3.151 +    "AppleMailTests",
   3.152  };
   3.153  
   3.154  // This file is generated, so magic constants are ok.
   3.155  int SuiteMaker::num_suites = 38;
   3.156  
   3.157  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   3.158 -    if (strcmp(test_class_name, "DecorateTests") == 0)
   3.159 -        *test_suite = new DecorateTests(test_class_name, test_home);
   3.160 +    if (strcmp(test_class_name, "MimeTests") == 0)
   3.161 +        *test_suite = new MimeTests(test_class_name, test_home);
   3.162 +    else if (strcmp(test_class_name, "BloblistTests") == 0)
   3.163 +        *test_suite = new BloblistTests(test_class_name, test_home);
   3.164 +    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   3.165 +        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   3.166 +    else if (strcmp(test_class_name, "I18nTests") == 0)
   3.167 +        *test_suite = new I18nTests(test_class_name, test_home);
   3.168 +    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   3.169 +        *test_suite = new IdentityListTests(test_class_name, test_home);
   3.170 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   3.171 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   3.172 +    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   3.173 +        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   3.174 +    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   3.175 +        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   3.176 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   3.177 +        *test_suite = new StringlistTests(test_class_name, test_home);
   3.178 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   3.179 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   3.180 +    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   3.181 +        *test_suite = new MessageApiTests(test_class_name, test_home);
   3.182 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   3.183 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   3.184 +    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   3.185 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   3.186 +    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   3.187 +        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   3.188 +    else if (strcmp(test_class_name, "BCCTests") == 0)
   3.189 +        *test_suite = new BCCTests(test_class_name, test_home);
   3.190 +    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   3.191 +        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   3.192 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   3.193 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   3.194 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   3.195 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   3.196 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   3.197 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   3.198 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   3.199 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   3.200 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   3.201 +        *test_suite = new SequenceTests(test_class_name, test_home);
   3.202 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   3.203 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   3.204 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   3.205 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   3.206 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   3.207 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   3.208 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   3.209 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   3.210 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   3.211 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   3.212 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   3.213 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   3.214      else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   3.215          *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   3.216 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   3.217 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   3.218 -    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   3.219 -        *test_suite = new AppleMailTests(test_class_name, test_home);
   3.220 +    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   3.221 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   3.222 +    else if (strcmp(test_class_name, "DecorateTests") == 0)
   3.223 +        *test_suite = new DecorateTests(test_class_name, test_home);
   3.224      else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   3.225          *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   3.226 -    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   3.227 -        *test_suite = new IdentityListTests(test_class_name, test_home);
   3.228 -    else if (strcmp(test_class_name, "I18nTests") == 0)
   3.229 -        *test_suite = new I18nTests(test_class_name, test_home);
   3.230 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   3.231 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   3.232 -    else if (strcmp(test_class_name, "BCCTests") == 0)
   3.233 -        *test_suite = new BCCTests(test_class_name, test_home);
   3.234 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   3.235 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   3.236 -    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   3.237 -        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   3.238 -    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   3.239 -        *test_suite = new MessageApiTests(test_class_name, test_home);
   3.240 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   3.241 -        *test_suite = new StringlistTests(test_class_name, test_home);
   3.242 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   3.243 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   3.244      else if (strcmp(test_class_name, "StringpairListTests") == 0)
   3.245          *test_suite = new StringpairListTests(test_class_name, test_home);
   3.246 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   3.247 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   3.248 +    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
   3.249 +        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
   3.250      else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   3.251          *test_suite = new TrustManipulationTests(test_class_name, test_home);
   3.252      else if (strcmp(test_class_name, "SyncTests") == 0)
   3.253          *test_suite = new SyncTests(test_class_name, test_home);
   3.254 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   3.255 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   3.256 -    else if (strcmp(test_class_name, "BloblistTests") == 0)
   3.257 -        *test_suite = new BloblistTests(test_class_name, test_home);
   3.258 -    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
   3.259 -        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
   3.260 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   3.261 -        *test_suite = new SequenceTests(test_class_name, test_home);
   3.262 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   3.263 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   3.264 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   3.265 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   3.266 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   3.267 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   3.268 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   3.269 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   3.270 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   3.271 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   3.272 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   3.273 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   3.274 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   3.275 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   3.276 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   3.277 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   3.278 -    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   3.279 -        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   3.280 -    else if (strcmp(test_class_name, "MimeTests") == 0)
   3.281 -        *test_suite = new MimeTests(test_class_name, test_home);
   3.282 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   3.283 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   3.284 -    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   3.285 -        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   3.286 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   3.287 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   3.288 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   3.289 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   3.290 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   3.291 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   3.292 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   3.293 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   3.294 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   3.295 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   3.296 -    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   3.297 -        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   3.298 +    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   3.299 +        *test_suite = new AppleMailTests(test_class_name, test_home);
   3.300  }
   3.301  
   3.302  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {
     4.1 --- a/test/src/engine_tests/KeyResetMessageTests.cc	Thu Oct 04 09:40:44 2018 +0200
     4.2 +++ b/test/src/engine_tests/KeyResetMessageTests.cc	Thu Oct 04 17:43:08 2018 +0200
     4.3 @@ -167,7 +167,8 @@
     4.4      outgoing_msg->to = send_idents;
     4.5      outgoing_msg->shortmsg = strdup("Well isn't THIS a useless message...");
     4.6      outgoing_msg->longmsg = strdup("Hi Mom...\n");
     4.7 -    outgoing_msg->attachments = new_bloblist(NULL, 0, "application/octet-stream", NULL);
     4.8 +    // outgoing_msg->attachments = new_bloblist(NULL, 0, "application/octet-stream", NULL);
     4.9 +    // that's illegal - VB.
    4.10      cout << "Message created.\n\n";
    4.11      cout << "Encrypting message as MIME multipart…\n";
    4.12      message* enc_outgoing_msg = nullptr;