fixing ENGINE-453
authorVolker Birk <vb@pep.foundation>
Tue, 07 Aug 2018 14:24:15 +0200
changeset 2803fadf1e8e22ff
parent 2802 cdfc6bed129f
child 2805 65829c954ea7
child 2829 e444c3c960bb
fixing ENGINE-453
test/convenience_scripts/DANGER_delete_keys_silently_w_pattern.py
test/convenience_scripts/keygen_for_test.py
test/python_tests/setup_test.py
test/python_tests/test_handshake.py
test/src/EngineTestSuite.cc
     1.1 --- a/test/convenience_scripts/DANGER_delete_keys_silently_w_pattern.py	Sat Aug 04 23:59:14 2018 +0200
     1.2 +++ b/test/convenience_scripts/DANGER_delete_keys_silently_w_pattern.py	Tue Aug 07 14:24:15 2018 +0200
     1.3 @@ -9,7 +9,7 @@
     1.4  
     1.5  args = parser.parse_args()
     1.6  
     1.7 -homedir = os.path.join(os.path.expanduser('~'),".gnupg")
     1.8 +homedir = os.path.join(os.path.expanduser('~'),"gnupg")
     1.9  print("GNUPGHOME=" + homedir + "\n")
    1.10  
    1.11  try:
     2.1 --- a/test/convenience_scripts/keygen_for_test.py	Sat Aug 04 23:59:14 2018 +0200
     2.2 +++ b/test/convenience_scripts/keygen_for_test.py	Tue Aug 07 14:24:15 2018 +0200
     2.3 @@ -16,7 +16,7 @@
     2.4  pub_path = os.path.join(args.output_root, "pub")
     2.5  priv_path = os.path.join(args.output_root, "priv")
     2.6  
     2.7 -homedir = os.path.join(os.path.expanduser('~'),".gnupg")
     2.8 +homedir = os.path.join(os.path.expanduser('~'),"gnupg")
     2.9  print("GNUPGHOME=" + homedir + "\n")
    2.10  
    2.11  try:
     3.1 --- a/test/python_tests/setup_test.py	Sat Aug 04 23:59:14 2018 +0200
     3.2 +++ b/test/python_tests/setup_test.py	Tue Aug 07 14:24:15 2018 +0200
     3.3 @@ -38,7 +38,7 @@
     3.4      "create own identities as part of the test setup"
     3.5  
     3.6      os.environ["HOME"] = os.path.join(mydir, arthome)
     3.7 -    os.environ["GNUPGHOME"] = os.path.join(mydir, arthome, '.gnupg')
     3.8 +    os.environ["GNUPGHOME"] = os.path.join(mydir, arthome, 'gnupg')
     3.9  
    3.10      import pEp
    3.11      me = pEp.Identity()
     4.1 --- a/test/python_tests/test_handshake.py	Sat Aug 04 23:59:14 2018 +0200
     4.2 +++ b/test/python_tests/test_handshake.py	Tue Aug 07 14:24:15 2018 +0200
     4.3 @@ -20,7 +20,7 @@
     4.4          arthome = "test1"
     4.5  
     4.6          os.environ["HOME"] = os.path.join(mydir, arthome)
     4.7 -        os.environ["GNUPGHOME"] = os.path.join(mydir, arthome, '.gnupg')
     4.8 +        os.environ["GNUPGHOME"] = os.path.join(mydir, arthome, 'gnupg')
     4.9  
    4.10          os.chdir(os.path.join(mydir, arthome))
    4.11  
    4.12 @@ -79,7 +79,7 @@
    4.13          arthome = "test2"
    4.14  
    4.15          os.environ["HOME"] = os.path.join(mydir, arthome)
    4.16 -        os.environ["GNUPGHOME"] = os.path.join(mydir, arthome, '.gnupg')
    4.17 +        os.environ["GNUPGHOME"] = os.path.join(mydir, arthome, 'gnupg')
    4.18  
    4.19          os.chdir(os.path.join(mydir, arthome))
    4.20  
     5.1 --- a/test/src/EngineTestSuite.cc	Sat Aug 04 23:59:14 2018 +0200
     5.2 +++ b/test/src/EngineTestSuite.cc	Tue Aug 07 14:24:15 2018 +0200
     5.3 @@ -85,23 +85,23 @@
     5.4      cout << "home is " << home << endl;
     5.5      assert(temp_test_home.compare(home) != 0);
     5.6      assert(temp_test_home.compare(home + "/") != 0);
     5.7 -    assert(temp_test_home.compare(home + "/.gnupg") != 0);
     5.8 -    assert(temp_test_home.compare(home + ".gnupg") != 0);
     5.9 +    assert(temp_test_home.compare(home + "/gnupg") != 0);
    5.10 +    assert(temp_test_home.compare(home + "gnupg") != 0);
    5.11      assert(temp_test_home.compare(prev_gpg_home) != 0);
    5.12 -    assert(temp_test_home.compare(prev_gpg_home + "/.gnupg") != 0);
    5.13 -    assert(temp_test_home.compare(prev_gpg_home + ".gnupg") != 0);
    5.14 +    assert(temp_test_home.compare(prev_gpg_home + "/gnupg") != 0);
    5.15 +    assert(temp_test_home.compare(prev_gpg_home + "gnupg") != 0);
    5.16  
    5.17      if (temp_test_home.compare(home) == 0 || temp_test_home.compare(home + "/") == 0 ||
    5.18 -        temp_test_home.compare(home + "/.gnupg") == 0 || temp_test_home.compare(home + ".gnupg") == 0 ||
    5.19 -        temp_test_home.compare(prev_gpg_home) == 0 || temp_test_home.compare(prev_gpg_home + "/.gnupg") == 0 ||
    5.20 -        temp_test_home.compare(prev_gpg_home + ".gnupg") == 0)
    5.21 +        temp_test_home.compare(home + "/gnupg") == 0 || temp_test_home.compare(home + "gnupg") == 0 ||
    5.22 +        temp_test_home.compare(prev_gpg_home) == 0 || temp_test_home.compare(prev_gpg_home + "/gnupg") == 0 ||
    5.23 +        temp_test_home.compare(prev_gpg_home + "gnupg") == 0)
    5.24          throw std::runtime_error("SETUP: new GNUPGHOME threatens to mess up user GNUPGHOME (and delete all their keys). NO DICE.");
    5.25      
    5.26  //    cout << "Ok - checked if new test home will be safe. We'll try and make the directory, deleting it if it has already exists." << endl;
    5.27      
    5.28      struct stat buf;
    5.29      
    5.30 -    success = setenv("GNUPGHOME", (temp_test_home + "/.gnupg").c_str(), 1);
    5.31 +    success = setenv("GNUPGHOME", (temp_test_home + "/gnupg").c_str(), 1);
    5.32      if (success != 0)
    5.33          throw std::runtime_error("SETUP: Error when setting GNUPGHOME.");
    5.34  
    5.35 @@ -156,4 +156,5 @@
    5.36  
    5.37  void EngineTestSuite::set_my_name() {
    5.38      my_name = typeid(*this).name();
    5.39 -}
    5.40 \ No newline at end of file
    5.41 +}
    5.42 +