Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
3b66d031
Commit
3b66d031
authored
May 09, 2017
by
Eric Cano
Browse files
Added a central switch to enable/disable Rados based unit tests.
parent
8d29de3d
Changes
6
Hide whitespace changes
Inline
Side-by-side
objectstore/BackendRadosTestSwitch.hpp
0 → 100644
View file @
3b66d031
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// A central switch to enable/disable RADOS based tests.
#pragma once
#undef TEST_RADOS
objectstore/BackendTest.cpp
View file @
3b66d031
...
...
@@ -20,6 +20,7 @@
#include "BackendVFS.hpp"
#include "BackendRados.hpp"
#include "common/exception/Exception.hpp"
#include "BackendRadosTestSwitch.hpp"
namespace
unitTests
{
...
...
@@ -141,8 +142,7 @@ TEST_P(BackendAbstractTest, ParametersInterface) {
}
static
cta
::
objectstore
::
BackendVFS
osVFS
(
__LINE__
,
__FILE__
);
#define TEST_RADOS 0
#if TEST_RADOS
#ifdef TEST_RADOS
static
cta
::
objectstore
::
BackendRados
osRados
(
"tapetest"
,
"tapetest"
);
INSTANTIATE_TEST_CASE_P
(
BackendTestRados
,
BackendAbstractTest
,
::
testing
::
Values
((
cta
::
objectstore
::
Backend
*
)
&
osRados
));
#endif
...
...
scheduler/OStoreDB/OStoreDBTest.cpp
View file @
3b66d031
...
...
@@ -25,6 +25,7 @@
#include "common/log/Logger.hpp"
#include "common/log/StringLogger.hpp"
#include "OStoreDB.hpp"
#include "objectstore/BackendRadosTestSwitch.hpp"
namespace
unitTests
{
...
...
@@ -170,8 +171,7 @@ TEST_P(OStoreDBTest, getBatchArchiveJob) {
}
static
cta
::
objectstore
::
BackendVFS
osVFS
(
__LINE__
,
__FILE__
);
#define TEST_RADOS 0
#if TEST_RADOS
#ifdef TEST_RADOS
static
cta
::
OStoreDBFactory
<
cta
::
objectstore
::
BackendRados
>
OStoreDBFactoryRados
(
"rados://tapetest@tapetest"
);
INSTANTIATE_TEST_CASE_P
(
OStoreTestRados
,
OStoreDBTest
,
::
testing
::
Values
(
OStoreDBTestParams
(
OStoreDBFactoryRados
)));
...
...
scheduler/SchedulerDatabaseTest.cpp
View file @
3b66d031
...
...
@@ -26,6 +26,7 @@
#include "OStoreDB/OStoreDBFactory.hpp"
#include "objectstore/BackendRados.hpp"
#include "common/log/DummyLogger.hpp"
#include "objectstore/BackendRadosTestSwitch.hpp"
#include <exception>
#include <gtest/gtest.h>
...
...
@@ -257,8 +258,6 @@ INSTANTIATE_TEST_CASE_P(OStoreSchedulerDatabaseTestVFS, SchedulerDatabaseTest,
::
testing
::
Values
(
SchedulerDatabaseTestParam
(
OStoreDBFactoryVFS
)));
#endif
#undef TEST_RADOS
#ifdef TEST_RADOS
static
cta
::
OStoreDBFactory
<
cta
::
objectstore
::
BackendRados
>
OStoreDBFactoryRados
(
"rados://tapetest@tapetest"
);
...
...
scheduler/SchedulerTest.cpp
View file @
3b66d031
...
...
@@ -33,6 +33,7 @@
#include "scheduler/TapeMount.hpp"
#include "tests/TempFile.hpp"
#include "common/log/DummyLogger.hpp"
#include "objectstore/BackendRadosTestSwitch.hpp"
#include <exception>
#include <gtest/gtest.h>
...
...
@@ -619,7 +620,6 @@ INSTANTIATE_TEST_CASE_P(OStoreDBPlusMockSchedulerTestVFS, SchedulerTest,
::
testing
::
Values
(
SchedulerTestParam
(
OStoreDBFactoryVFS
)));
#endif
#undef TEST_RADOS
#ifdef TEST_RADOS
static
cta
::
OStoreDBFactory
<
cta
::
objectstore
::
BackendRados
>
OStoreDBFactoryRados
(
"rados://tapetest@tapetest"
);
...
...
tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
View file @
3b66d031
...
...
@@ -52,6 +52,7 @@
#include "scheduler/testingMocks/MockArchiveJob.hpp"
#include "scheduler/testingMocks/MockArchiveMount.hpp"
#include "tests/TempFile.hpp"
#include "objectstore/BackendRadosTestSwitch.hpp"
#include <dirent.h>
#include <fcntl.h>
...
...
@@ -1536,7 +1537,6 @@ INSTANTIATE_TEST_CASE_P(OStoreDBPlusMockSchedulerTestVFS, DataTransferSessionTes
::
testing
::
Values
(
DataTransferSessionTestParam
(
OStoreDBFactoryVFS
)));
#endif
#undef TEST_RADOS
#ifdef TEST_RADOS
static
cta
::
OStoreDBFactory
<
cta
::
objectstore
::
BackendRados
>
OStoreDBFactoryRados
(
"rados://tapetest@tapetest"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment