summaryrefslogtreecommitdiffstats
path: root/config/src/tests/raw_subscription
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-05 23:32:00 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-02-06 00:26:08 +0000
commit4c5a7cac411b30b9b4bd3ca067efcc9f3719b0ea (patch)
tree2e09c62b854357bbb1c8d433898d004e3f3995a5 /config/src/tests/raw_subscription
parentb84ef936b1cedce0b99f79e03b2fe25a8db5f7c3 (diff)
Reduce code visibility and include only what you need from config library.
Diffstat (limited to 'config/src/tests/raw_subscription')
-rw-r--r--config/src/tests/raw_subscription/raw_subscription.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/config/src/tests/raw_subscription/raw_subscription.cpp b/config/src/tests/raw_subscription/raw_subscription.cpp
index 7141a21d35d..da35d10da52 100644
--- a/config/src/tests/raw_subscription/raw_subscription.cpp
+++ b/config/src/tests/raw_subscription/raw_subscription.cpp
@@ -1,9 +1,8 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/config/config.h>
#include <vespa/config/common/configholder.h>
#include <vespa/config/common/sourcefactory.h>
-#include <vespa/config/raw/rawsource.h>
+#include <vespa/config/subscription/configsubscriber.hpp>
#include "config-my.h"
using namespace config;
@@ -13,13 +12,13 @@ TEST("require that raw spec can create source factory")
RawSpec spec("myField \"foo\"\n");
auto raw = spec.createSourceFactory(TimingValues());
ASSERT_TRUE(raw);
- IConfigHolder::SP holder(new ConfigHolder());
- Source::UP src = raw->createSource(holder, ConfigKey("myid", "my", "bar", "foo"));
+ std::shared_ptr<IConfigHolder> holder(new ConfigHolder());
+ std::unique_ptr<Source> src = raw->createSource(holder, ConfigKey("myid", "my", "bar", "foo"));
ASSERT_TRUE(src);
src->getConfig();
ASSERT_TRUE(holder->poll());
- ConfigUpdate::UP update(holder->provide());
+ std::unique_ptr<ConfigUpdate> update(holder->provide());
ASSERT_TRUE(update);
const ConfigValue & value(update->getValue());
ASSERT_EQUAL(1u, value.numLines());