Skip to content

Commit

Permalink
fixing headers and renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri authored and bruno-at-bareos committed Apr 26, 2022
1 parent c0273bb commit c0cd8fc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
7 changes: 3 additions & 4 deletions core/src/tests/testing_common.h
Expand Up @@ -19,19 +19,18 @@
02110-1301, USA.
*/

#ifndef TESTING_COMMON_H
#define TESTING_COMMON_H
#ifndef BAREOS_TESTS_TESTING_COMMON_H_
#define BAREOS_TESTS_TESTING_COMMON_H_

#if defined(HAVE_MINGW)
# include "include/bareos.h"
#endif

#include "gtest/gtest.h"
#include "gmock/gmock.h"

#include "lib/parse_conf.h"

typedef std::unique_ptr<ConfigurationParser> PConfigParser;


#endif // TESTING_COMMON_H
#endif // BAREOS_TESTS_TESTING_COMMON_H_
6 changes: 3 additions & 3 deletions core/src/tests/testing_dir_common.h
Expand Up @@ -19,8 +19,8 @@
02110-1301, USA.
*/

#ifndef TESTING_DIR_COMMON_H
#define TESTING_DIR_COMMON_H
#ifndef BAREOS_TESTS_TESTING_DIR_COMMON_H_
#define BAREOS_TESTS_TESTING_DIR_COMMON_H_

#include "testing_common.h"

Expand All @@ -31,4 +31,4 @@ void InitDirGlobals();

PConfigParser DirectorPrepareResources(const std::string& path_to_config);

#endif // TESTING_DIR_COMMON_H
#endif // BAREOS_TESTS_TESTING_DIR_COMMON_H_
6 changes: 3 additions & 3 deletions core/src/tests/testing_sd_common.cc
Expand Up @@ -40,9 +40,9 @@ PConfigParser StoragePrepareResources(const std::string& path_to_config)
EXPECT_NE(storage_config.get(), nullptr);
if (!storage_config) { return nullptr; }

bool parse_director_config_ok = storage_config->ParseConfig();
EXPECT_TRUE(parse_director_config_ok) << "Could not parse storage config";
if (!parse_director_config_ok) { return nullptr; }
bool parse_storage_config_ok = storage_config->ParseConfig();
EXPECT_TRUE(parse_storage_config_ok) << "Could not parse storage config";
if (!parse_storage_config_ok) { return nullptr; }

Dmsg0(200, "Start UA server\n");
storagedaemon::me
Expand Down
27 changes: 24 additions & 3 deletions core/src/tests/testing_sd_common.h
@@ -1,5 +1,26 @@
#ifndef TESTING_SD_COMMON_H
#define TESTING_SD_COMMON_H
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2021-2022 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
License as published by the Free Software Foundation and included
in the file LICENSE.
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
Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/

#ifndef BAREOS_TESTS_TESTING_SD_COMMON_H_
#define BAREOS_TESTS_TESTING_SD_COMMON_H_

#include "testing_common.h"

Expand All @@ -10,4 +31,4 @@ void InitSdGlobals();

PConfigParser StoragePrepareResources(const std::string& path_to_config);

#endif // TESTING_SD_COMMON_H
#endif // BAREOS_TESTS_TESTING_SD_COMMON_H_

0 comments on commit c0cd8fc

Please sign in to comment.