GTEST_SKIP calls added (#4157)

Replace unit test early exit return statements with GTEST_SKIP macros.

---------

Co-authored-by: Moliner <Mario.Moliner@es.nestle.com>
Co-authored-by: clemahieu <clemahieu@gmail.com>
This commit is contained in:
mariomoliner 2023-02-28 17:16:36 +01:00 committed by GitHub
commit 900dda8386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 21 deletions

View file

@ -639,7 +639,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
// Check that upgrading from an unsupported version is not supported
auto path (nano::unique_path ());
@ -693,7 +693,7 @@ TEST (mdb_block_store, bad_path)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
nano::logger_mt logger;
nano::lmdb::store store (logger, boost::filesystem::path ("///"), nano::dev::constants);
@ -1057,7 +1057,7 @@ TEST (mdb_block_store, sideband_height)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
nano::logger_mt logger;
nano::keypair key1;
@ -1430,7 +1430,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
// Extract confirmation height to a separate database
auto path (nano::unique_path ());
@ -1593,7 +1593,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::mdb_val value;
@ -1640,7 +1640,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
nano::work_pool pool{ nano::dev::network_params.network, std::numeric_limits<unsigned>::max () };
nano::block_builder builder;
@ -1730,7 +1730,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::block_builder builder;
@ -2039,7 +2039,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::keypair key1;
@ -2176,7 +2176,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::logger_mt logger;
@ -2205,7 +2205,7 @@ namespace lmdb
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::logger_mt logger;
@ -2236,7 +2236,7 @@ TEST (mdb_block_store, upgrade_backup)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto dir (nano::unique_path ());
namespace fs = boost::filesystem;
@ -2277,7 +2277,7 @@ TEST (block_store, confirmation_height)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::logger_mt logger;
@ -2323,7 +2323,7 @@ TEST (block_store, final_vote)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode as deletions cause inaccurate counts
return;
GTEST_SKIP ();
}
auto path (nano::unique_path ());
nano::logger_mt logger;
@ -2441,7 +2441,7 @@ TEST (rocksdb_block_store, tombstone_count)
{
if (!nano::rocksdb_config::using_rocksdb_in_tests ())
{
return;
GTEST_SKIP ();
}
nano::test::system system{};
nano::logger_mt logger;

View file

@ -1195,7 +1195,7 @@ TEST (confirmation_heightDeathTest, rollback_added_block)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
// For ASSERT_DEATH_IF_SUPPORTED
testing::FLAGS_gtest_death_test_style = "threadsafe";
@ -1287,7 +1287,7 @@ TEST (confirmation_heightDeathTest, modified_chain)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
// For ASSERT_DEATH_IF_SUPPORTED
testing::FLAGS_gtest_death_test_style = "threadsafe";
@ -1365,7 +1365,7 @@ TEST (confirmation_heightDeathTest, modified_chain_account_removed)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
// For ASSERT_DEATH_IF_SUPPORTED
testing::FLAGS_gtest_death_test_style = "threadsafe";
@ -2083,7 +2083,7 @@ TEST (confirmation_height, unbounded_block_cache_iteration)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
nano::logger_mt logger;
auto path (nano::unique_path ());

View file

@ -17,7 +17,7 @@ TEST (ledger, store_error)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
auto ctx = nano::test::context::ledger_empty ();
}

View file

@ -3338,7 +3338,7 @@ TEST (node, bidirectional_tcp)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
#endif
nano::test::system system;

View file

@ -138,7 +138,7 @@ TEST (unchecked, multiple)
if (nano::rocksdb_config::using_rocksdb_in_tests ())
{
// Don't test this in rocksdb mode
return;
GTEST_SKIP ();
}
nano::logger_mt logger{};
auto store = nano::make_store (logger, nano::unique_path (), nano::dev::constants);