version 1.5

This commit is contained in:
Johannes Holzwarth | SE-Inno GmbH
2024-01-11 14:04:25 +01:00
parent 0ee8291846
commit 4492763b78
756 changed files with 209957 additions and 2 deletions
@@ -0,0 +1,34 @@
<?php
use InfluxDB2\Model\TaskCreateRequest;
use InfluxDB2\Service\TasksService;
require_once('IntegrationBaseTestCase.php');
/**
* @group integration
*/
class ITTaskServiceTest extends IntegrationBaseTestCase
{
public function testCreateTask()
{
/** @var TasksService $taskService */
$taskService = $this->client->createService(TasksService::class);
$flux = "option task = {
name: \"task-name\",
every: 6h
}
from(bucket: \"telegraf\") |> range(start: -1h)
";
$taskCreateRequest = new TaskCreateRequest();
$taskCreateRequest
->setFlux($flux)
->setOrgId($this->findMyOrg()->getId());
$task = $taskService->postTasks($taskCreateRequest);
self::assertEquals("task-name", $task->getName());
}
}