Author: dmacvicar Date: Fri Aug 24 00:38:39 2007 New Revision: 6852 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6852&view=rev Log: test for reading signature id Modified: trunk/libzypp/tests/zypp/KeyRing.cc Modified: trunk/libzypp/tests/zypp/KeyRing.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/KeyRing.cc?rev=6852&r1=6851&r2=6852&view=diff ============================================================================== --- trunk/libzypp/tests/zypp/KeyRing.cc (original) +++ trunk/libzypp/tests/zypp/KeyRing.cc Fri Aug 24 00:38:39 2007 @@ -28,6 +28,8 @@ { PublicKey key( Pathname(dir) + "public.asc" ); + + /** * scenario #1 * import a not trusted key @@ -40,7 +42,7 @@ // base sandbox for playing TmpDir tmp_dir; KeyRing keyring( tmp_dir.path() ); - + BOOST_CHECK_EQUAL( keyring.publicKeys().size(), (unsigned) 0 ); BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), (unsigned) 0 ); @@ -189,6 +191,18 @@ //keyring.importKey( key, true ); //BOOST_CHECK_EQUAL( receiver._trusted_key_added_called, true ); //BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), 1 ); + + /* check signature id can be extracted */ + { + KeyRingTestReceiver keyring_callbacks; + KeyRingTestSignalReceiver receiver; + // base sandbox for playing + TmpDir tmp_dir; + KeyRing keyring( tmp_dir.path() ); + + BOOST_CHECK_EQUAL( keyring.readSignatureKeyId( Pathname(dir) + "repomd.xml.asc" ), "BD61D89BD98821BE" ); + BOOST_CHECK_EQUAL( keyring.readSignatureKeyId(Pathname()), "" ); + } } test_suite* -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org