mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
22 lines
476 B
C++
22 lines
476 B
C++
#include <metrics/metrictank_publisher.hpp>
|
|
|
|
#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"));
|
|
}
|