mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +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 "base/application.hpp"
|
||||
#include "base/loader.hpp"
|
||||
#include "icingaapplication-fixture.hpp"
|
||||
#include <BoostTestTargetConfig.h>
|
||||
|
||||
using namespace icinga;
|
||||
@ -29,6 +30,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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user