Line data Source code
1 : /**
2 : * @file stream_OpMoFacility_test.cxx Test application that tests and demonstrates
3 : * basic functionality of the the streamOpMonFacility
4 : *
5 : * This is part of the DUNE DAQ Application Framework, copyright 2020.
6 : * Licensing/copyright details are in the COPYING file that you should have
7 : * received with this code.
8 : */
9 :
10 : #include "opmonlib/OpMonFacility.hpp"
11 : #include "opmonlib/Utils.hpp"
12 : #include "opmonlib/opmon/test.pb.h"
13 :
14 : #define BOOST_TEST_MODULE stream_opmon_facility_test // NOLINT
15 :
16 : #include "boost/test/unit_test.hpp"
17 :
18 : using namespace dunedaq::opmonlib;
19 : using namespace dunedaq::opmon;
20 :
21 2 : BOOST_AUTO_TEST_CASE(Invalid_Creation)
22 : {
23 :
24 : // failure due to wrong formatting
25 3 : BOOST_CHECK_THROW(auto service = makeOpMonFacility("stream://bla_bla"), OpMonFacilityCreationFailed);
26 :
27 1 : BOOST_CHECK_NO_THROW(auto service = makeOpMonFacility("stream://test.website.com:5005/no_topic"));
28 1 : }
|