diff options
Diffstat (limited to 'src/test/core/GpgCoreTestFileBasicOpera.cpp')
-rw-r--r-- | src/test/core/GpgCoreTestFileBasicOpera.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/core/GpgCoreTestFileBasicOpera.cpp b/src/test/core/GpgCoreTestFileBasicOpera.cpp index ce7359b2..9a0c6a34 100644 --- a/src/test/core/GpgCoreTestFileBasicOpera.cpp +++ b/src/test/core/GpgCoreTestFileBasicOpera.cpp @@ -42,6 +42,7 @@ namespace GpgFrontend::Test { TEST_F(GpgCoreTest, CoreFileEncryptDecrTest) { auto encrypt_key = GpgKeyGetter::GetInstance().GetPubkey( "E87C6A2D8D95C818DE93B3AE6A2764F8298DEB29"); + ASSERT_TRUE(encrypt_key.IsGood()); auto buffer = GFBuffer(QString("Hello GpgFrontend!")); auto input_file = CreateTempFileAndWriteData(buffer); @@ -73,6 +74,7 @@ TEST_F(GpgCoreTest, CoreFileEncryptDecrTest) { TEST_F(GpgCoreTest, CoreFileEncryptDecrBinaryTest) { auto encrypt_key = GpgKeyGetter::GetInstance().GetPubkey( "E87C6A2D8D95C818DE93B3AE6A2764F8298DEB29"); + ASSERT_TRUE(encrypt_key.IsGood()); auto buffer = GFBuffer(QString("Hello GpgFrontend!")); auto input_file = CreateTempFileAndWriteData(buffer); @@ -165,6 +167,8 @@ TEST_F(GpgCoreTest, CoreFileEncryptSymmetricDecrBinaryTest) { TEST_F(GpgCoreTest, CoreFileSignVerifyNormalTest) { auto sign_key = GpgKeyGetter::GetInstance().GetPubkey( "467F14220CE8DCF780CF4BAD8465C55B25C9B7D1"); + ASSERT_TRUE(sign_key.IsGood()); + auto input_file = CreateTempFileAndWriteData("Hello GpgFrontend!"); auto output_file = GetTempFilePath(); @@ -190,6 +194,8 @@ TEST_F(GpgCoreTest, CoreFileSignVerifyNormalTest) { TEST_F(GpgCoreTest, CoreFileSignVerifyNormalBinaryTest) { auto sign_key = GpgKeyGetter::GetInstance().GetPubkey( "467F14220CE8DCF780CF4BAD8465C55B25C9B7D1"); + ASSERT_TRUE(sign_key.IsGood()); + auto input_file = CreateTempFileAndWriteData("Hello GpgFrontend!"); auto output_file = GetTempFilePath(); @@ -215,8 +221,12 @@ TEST_F(GpgCoreTest, CoreFileSignVerifyNormalBinaryTest) { TEST_F(GpgCoreTest, CoreFileEncryptSignDecrVerifyTest) { auto encrypt_key = GpgKeyGetter::GetInstance().GetPubkey( "467F14220CE8DCF780CF4BAD8465C55B25C9B7D1"); + ASSERT_TRUE(encrypt_key.IsGood()); + auto sign_key = GpgKeyGetter::GetInstance().GetKey( "8933EB283A18995F45D61DAC021D89771B680FFB"); + ASSERT_TRUE(sign_key.IsGood()); + auto buffer = GFBuffer(QString("Hello GpgFrontend!")); auto input_file = CreateTempFileAndWriteData(buffer); auto output_file = GetTempFilePath(); @@ -259,8 +269,11 @@ TEST_F(GpgCoreTest, CoreFileEncryptSignDecrVerifyTest) { TEST_F(GpgCoreTest, CoreFileEncryptSignDecrVerifyBinaryTest) { auto encrypt_key = GpgKeyGetter::GetInstance().GetPubkey( "467F14220CE8DCF780CF4BAD8465C55B25C9B7D1"); + ASSERT_TRUE(encrypt_key.IsGood()); auto sign_key = GpgKeyGetter::GetInstance().GetKey( "8933EB283A18995F45D61DAC021D89771B680FFB"); + ASSERT_TRUE(sign_key.IsGood()); + auto buffer = GFBuffer(QString("Hello GpgFrontend!")); auto input_file = CreateTempFileAndWriteData(buffer); auto output_file = GetTempFilePath(); |