mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-25 18:48:50 +02:00
tests: Ensure IcingaApplication is initialized before adding config
This avoids an ordering problem noticed in Boost 1.55
This commit is contained in:
parent
eb71e16995
commit
3adfd396f4
@ -21,6 +21,7 @@
|
|||||||
#include "config/configitem.hpp"
|
#include "config/configitem.hpp"
|
||||||
#include "base/application.hpp"
|
#include "base/application.hpp"
|
||||||
#include "base/loader.hpp"
|
#include "base/loader.hpp"
|
||||||
|
#include "icingaapplication-fixture.hpp"
|
||||||
#include <BoostTestTargetConfig.h>
|
#include <BoostTestTargetConfig.h>
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
@ -29,6 +30,9 @@ struct LivestatusFixture
|
|||||||
{
|
{
|
||||||
LivestatusFixture()
|
LivestatusFixture()
|
||||||
{
|
{
|
||||||
|
// ensure IcingaApplication is initialized before we try to add config
|
||||||
|
IcingaApplicationFixture icinga;
|
||||||
|
|
||||||
BOOST_TEST_MESSAGE("Preparing config objects...");
|
BOOST_TEST_MESSAGE("Preparing config objects...");
|
||||||
|
|
||||||
ConfigItem::RunWithActivationContext(new Function("CreateTestObjects", CreateTestObjects));
|
ConfigItem::RunWithActivationContext(new Function("CreateTestObjects", CreateTestObjects));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user