]> granicus.if.org Git - icinga2/blobdiff - test/livestatus-fixture.cpp
Merge pull request #6999 from Icinga/bugfix/compiler-warnings
[icinga2] / test / livestatus-fixture.cpp
index 8007b159aa30b5c5b033d2f55bc89c4c7e61ae30..aaa0e073adcfe4d64a751e7dbf4391fce2d0591a 100644 (file)
@@ -1,26 +1,10 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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 2             *
- * 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, write to the Free Software Foundation     *
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
- ******************************************************************************/
+/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
 
 #include "config/configcompiler.hpp"
 #include "config/configitem.hpp"
 #include "base/application.hpp"
 #include "base/loader.hpp"
+#include "icingaapplication-fixture.hpp"
 #include <BoostTestTargetConfig.h>
 
 using namespace icinga;
@@ -29,6 +13,9 @@ struct LivestatusFixture
 {
        LivestatusFixture()
        {
+               // ensure IcingaApplication is initialized before we try to add config
+               IcingaApplicationFixture icinga;
+
                BOOST_TEST_MESSAGE("Preparing config objects...");
 
                ConfigItem::RunWithActivationContext(new Function("CreateTestObjects", CreateTestObjects));