ENGINE-427: intermittent checkin - makin the tests ENGINE-427
authorKrista Bennett <krista@pep-project.org>
Wed, 27 Jun 2018 17:08:58 +0200
branchENGINE-427
changeset 2777d0a7c4766c0a
parent 2776 003ce543c234
child 2781 50318bebf6ef
ENGINE-427: intermittent checkin - makin the tests
test/src/engine_tests/GPGConfFixTests.cc
test/test_files/427_bad_gpg_conf_1
test/test_files/427_bad_gpg_conf_2
test/test_files/427_bad_gpg_conf_3
test/test_files/427_bad_gpg_conf_4
test/test_files/427_bad_gpg_conf_5
test/test_files/427_bad_gpg_conf_6
     1.1 --- a/test/src/engine_tests/GPGConfFixTests.cc	Wed Jun 27 16:55:55 2018 +0200
     1.2 +++ b/test/src/engine_tests/GPGConfFixTests.cc	Wed Jun 27 17:08:58 2018 +0200
     1.3 @@ -13,11 +13,51 @@
     1.4  
     1.5  GPGConfFixTests::GPGConfFixTests(string suitename, string test_home_dir) :
     1.6      EngineTestIndividualSuite::EngineTestIndividualSuite(suitename, test_home_dir) {
     1.7 -    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_g_p_g_conf_fix"),
     1.8 -                                                                      static_cast<Func>(&GPGConfFixTests::check_g_p_g_conf_fix)));
     1.9 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_0"),
    1.10 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_0)));
    1.11 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_1"),
    1.12 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_1)));
    1.13 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_2"),
    1.14 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_2)));
    1.15 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_3"),
    1.16 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_3)));
    1.17 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_4"),
    1.18 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_4)));
    1.19 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_5"),
    1.20 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_5)));
    1.21 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("GPGConfFixTests::check_conf_fix_broken_conf_old_db_6"),
    1.22 +                                                                      static_cast<Func>(&GPGConfFixTests::check_conf_fix_broken_conf_old_db_6)));                                                                      
    1.23  }
    1.24  
    1.25 -void GPGConfFixTests::check_g_p_g_conf_fix() {
    1.26 -    TEST_ASSERT(true);
    1.27 +void GPGConfFixTests::setup() {
    1.28 +    EngineTestSuite::setup();
    1.29  }
    1.30  
    1.31 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_0() {
    1.32 +    set_full_env("test_files/427_bad_gpg_conf_0", NULL, "test_files/427_old_db");
    1.33 +}
    1.34 +
    1.35 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_1() {
    1.36 +    set_full_env("test_files/427_bad_gpg_conf_1", NULL, "test_files/427_old_db");    
    1.37 +}
    1.38 +
    1.39 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_2() {
    1.40 +    set_full_env("test_files/427_bad_gpg_conf_2", NULL, "test_files/427_old_db");        
    1.41 +}
    1.42 +
    1.43 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_3()() {
    1.44 +    set_full_env("test_files/427_bad_gpg_conf_3", NULL, "test_files/427_old_db");    
    1.45 +}
    1.46 +
    1.47 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_4() {
    1.48 +    set_full_env("test_files/427_bad_gpg_conf_4", NULL, "test_files/427_old_db");        
    1.49 +}
    1.50 +
    1.51 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_5() {
    1.52 +    set_full_env("test_files/427_bad_gpg_conf_5", NULL, "test_files/427_old_db");        
    1.53 +}
    1.54 +
    1.55 +void GPGConfFixTests::check_conf_fix_broken_conf_old_db_6() {
    1.56 +    set_full_env("test_files/427_bad_gpg_conf_6", NULL, "test_files/427_old_db");        
    1.57 +}
    1.58 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/test/test_files/427_bad_gpg_conf_1	Wed Jun 27 17:08:58 2018 +0200
     2.3 @@ -0,0 +1,6 @@
     2.4 +comment No Comment
     2.5 +keyid-format 0xlongignore-time-conflict 
     2.6 +personal-cipher-preferences AES 
     2.7 +ignore-time-conflict 
     2.8 +ignore-time-conflict 
     2.9 +allow-freeform-uid
    2.10 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/test/test_files/427_bad_gpg_conf_2	Wed Jun 27 17:08:58 2018 +0200
     3.3 @@ -0,0 +1,6 @@
     3.4 +comment No Commentallow-freeform-uid
     3.5 +keyid-format 0xlongignore-time-conflict 
     3.6 +personal-cipher-preferences AES 
     3.7 +ignore-time-conflict 
     3.8 +ignore-time-conflict 
     3.9 +allow-freeform-uid
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/test/test_files/427_bad_gpg_conf_3	Wed Jun 27 17:08:58 2018 +0200
     4.3 @@ -0,0 +1,6 @@
     4.4 +comment No Commentallow-freeform-uidallow-freeform-uid
     4.5 +keyid-format 0xlongignore-time-conflict 
     4.6 +personal-cipher-preferences AES 
     4.7 +ignore-time-conflict 
     4.8 +ignore-time-conflict 
     4.9 +allow-freeform-uid
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/test/test_files/427_bad_gpg_conf_4	Wed Jun 27 17:08:58 2018 +0200
     5.3 @@ -0,0 +1,6 @@
     5.4 +comment No Commentallow-freeform-uiddefault-cache-ttl ignore-time-conflict-buttsallow-freeform-uid
     5.5 +keyid-format 0xlongignore-time-conflict 
     5.6 +personal-cipher-preferences AES 
     5.7 +ignore-time-conflict 
     5.8 +ignore-time-conflict 
     5.9 +allow-freeform-uid
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/test/test_files/427_bad_gpg_conf_5	Wed Jun 27 17:08:58 2018 +0200
     6.3 @@ -0,0 +1,6 @@
     6.4 +comment No Commentallow-freeform-uidallow-freeform-uidallow-freeform-uid
     6.5 +keyid-format 0xlongignore-time-conflict 
     6.6 +personal-cipher-preferences AES 
     6.7 +ignore-time-conflict 
     6.8 +ignore-time-conflict 
     6.9 +allow-freeform-uid
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/test/test_files/427_bad_gpg_conf_6	Wed Jun 27 17:08:58 2018 +0200
     7.3 @@ -0,0 +1,2 @@
     7.4 +allow-freeform-uidallow-freeform-uidallow-freeform-uid
     7.5 +allow-freeform-uid