Cover merge global tags also when are missing

This commit is contained in:
Walter Dal Mut
2015-06-27 14:21:15 +02:00
parent 932cd992ff
commit 4517e5c31c
+29
View File
@@ -187,6 +187,35 @@ EOF
]);
}
/**
* @group udp
*/
public function testFillWithGlobalTags()
{
$options = (new Options())
->setDatabase("test")
->setTags(["dc" => "eu-west"]);
$adapter = $this->getMockBuilder("InfluxDB\\Adapter\\UdpAdapter")
->setConstructorArgs([$options])
->setMethods(["write"])
->getMock();
$adapter->expects($this->once())
->method("write")
->with($this->matchesRegularExpression("/mem,dc=eu-west free=712423 \d+/i"));
$adapter->send([
"points" => [
[
"measurement" => "mem",
"fields" => [
"free" => 712423,
],
],
]
]);
}
/**
* @group udp
*/