lokinet/test/util/metrics/test_llarp_metrics_metricktank.cpp

22 lines
481 B
C++
Raw Normal View History

2019-09-01 12:58:27 +00:00
#include <util/metrics/metrictank_publisher.hpp>
2019-04-10 11:53:37 +00:00
#include <gtest/gtest.h>
#include <gmock/gmock.h>
using namespace llarp;
using namespace ::testing;
using Interface = metrics::MetricTankPublisherInterface;
TEST(MetricTank, maketags)
{
Interface::Tags tags;
std::string result = Interface::makeSuffix(tags);
ASSERT_THAT(result, Not(IsEmpty()));
tags["user"] = "Thanos";
result = Interface::makeSuffix(tags);
ASSERT_THAT(result, HasSubstr(";user=Thanos"));
}