Skip to content

Commit

Permalink
Change method naming
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Sep 3, 2024
1 parent e2e3b27 commit 46c369a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
},
"autoload-dev": {
"psr-4": {
"Test\\Integration\\Cog\\OpenTsdbClient\\": "test/Integration",
"Test\\Unit\\Cog\\OpenTsdbClient\\": "test/Unit"
}
},
Expand Down
27 changes: 26 additions & 1 deletion test/Integration/OpenTsdbClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,32 @@

final class OpenTsdbClientTest extends TestCase
{
public function testSuccess(): void
public function testSendDataPointList(): void
{
if ($_ENV['APP_ENV'] === 'ci') {
$this->markTestSkipped('Only for development environment. Need to pull opentsdb container to GitHub.');
}

$dataPointList[] = new DataPoint(
metric: 'temperature',
timestamp: 1,
value: -38.04,
tags: ['place' => 'south_pole'],
);
$dataPointList[] = new DataPoint(
metric: 'temperature',
timestamp: 1,
value: -2.12,
tags: ['place' => 'north_pole'],
);

$openTsdbClient = $this->initOpenTsdbClient();

$openTsdbClient->sendDataPointList($dataPointList);
$this->assertTrue(true);
}

public function testSendDataPointListWithDebug(): void
{
if ($_ENV['APP_ENV'] === 'ci') {
$this->markTestSkipped('Only for development environment. Need to pull opentsdb container to GitHub.');
Expand Down

0 comments on commit 46c369a

Please sign in to comment.