[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] GPGSM always opens a pinentry: makes automated tests impossible
From: Ingo =?iso-8859-15?q?Kl=F6cker?= <kloecker () kde ! org>
Date: 2013-03-07 20:06:21
Message-ID: 201303072106.26640 () thufir ! ingo-kloecker ! de
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Thursday 07 March 2013, Kevin Krammer wrote:
> On Thursday, 2013-03-07, Sandro Knauß wrote:
> > Hello,
> >
> > I'm fixing the bugs now the tests in messageviewer(reviewboard
> > #109325) and messagecomposer(reviewboard #109327), that are
> > related to
> > encryption/signing. I already fixed them but, they won't run in
> > jenkins, because gpgsm (SMIME) always opens multiple pinentry
> > windows (that has to closed via mouse). For me it only runs with.
> > Only if I enter:
> >
> > export GNUPGHOME=$KDE_SRC/kdepim/messagecore/tests/gnupg_home
> > source `gpg-agent --daemon`
> >
> > than only one pinentry window opens.
> >
> > Someone knows how to get these tests running without pinentry
> > window.
> >
> > Keep in mind, that I never used gpgsm before, the workaround I
> > build based on my knowledge with gpg.
>
> I don't know either but maybe we could have a fake pinentry program
> that delivers a predetermined passphrase.
> The pinentry program seems to be specified by gpg-agent..conf so a
> unit test environment could likely have a special version of that.
Alternatively, we could create mocks for {Encrypt,Sign,EncryptSign}Job.
After all, we do not want to test encryption or signing, but just the
correct composition of signed and/or encrypted messages. Using mocks
will make this much simpler because they would always return the same
values. Hence a simple string comparison of the composed messages
against excepted result will do. With the real jobs checking a correct
result will be more difficult because the real jobs always return
different values (because the session key used for encryption is always
different and signatures contain a timestamp).
Regards,
Ingo
["signature.asc" (application/pgp-signature)]
_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic