aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-11-08 14:38:17 +0000
committerJustus Winter <[email protected]>2016-11-08 15:03:16 +0000
commit4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa (patch)
tree1dea7781f16be7e144108e920ea9e272f8e29e6b
parentgpgscm: Expose seek and associated constants. (diff)
downloadgnupg-4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa.tar.gz
gnupg-4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa.zip
tests: Simplify test.
* tests/openpgp/issue2417.scm: Simplify. Signed-off-by: Justus Winter <[email protected]>
-rwxr-xr-xtests/openpgp/issue2417.scm24
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/openpgp/issue2417.scm b/tests/openpgp/issue2417.scm
index 5f70e0872..f58400079 100755
--- a/tests/openpgp/issue2417.scm
+++ b/tests/openpgp/issue2417.scm
@@ -18,27 +18,15 @@
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (with-path "defs.scm"))
-(setup-legacy-environment)
+(setup-environment)
-(define old-home (getenv "GNUPGHOME"))
+(define keyfile (in-srcdir "samplekeys" "rsa-rsa-sample-1.asc"))
(define (touch file-name)
(close (open file-name (logior O_WRONLY O_BINARY O_CREAT) #o600)))
(info "Checking robustness wrt empty databases in gnupghome (issue2417)...")
-
-(lettmp
- ;; Prepare some random key to import later.
- (keyfile)
- (pipe:do
- (pipe:gpg '(--export alpha))
- (pipe:write-to keyfile (logior O_WRONLY O_BINARY O_CREAT) #o600))
-
- (with-temporary-working-directory
- (file-copy (path-join old-home "gpg.conf") "gpg.conf")
- (file-copy (path-join old-home "gpg-agent.conf") "gpg-agent.conf")
- (setenv "GNUPGHOME" "." #t)
- (touch "trustdb.gpg")
- (touch "pubring.gpg")
- (touch "pubring.kbx")
- (call-check `(,(tool 'GPG) --import ,keyfile))))
+(touch "trustdb.gpg")
+(touch "pubring.gpg")
+(touch "pubring.kbx")
+(call-check `(,(tool 'GPG) --import ,keyfile))