Skip to content

Commit

Permalink
tests: Update Snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
PROFeNoM committed Apr 2, 2024
1 parent 9277b48 commit e9fbe6c
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function (SpanData $span) use ($rootSpan, $method, $service) {

// We took the assumption that all controllers will extend CI_Controller.
// But we've at least seen one healthcheck controller not extending it.
if ($this->load && \method_exists($this->load, 'helper')) {
if (property_exists($this, 'load') && $this->load && \method_exists($this->load, 'helper')) {
$this->load->helper('url');

if (!array_key_exists(Tag::HTTP_URL, $rootSpan->meta)) {
Expand Down
4 changes: 3 additions & 1 deletion tests/Integrations/CodeIgniter/V3_1/CommonScenariosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ protected static function getAppIndexScript()

protected static function getEnvs()
{
return array_merge(parent::getEnvs(), ['DD_SERVICE' => 'codeigniter_test_app']);
return array_merge(parent::getEnvs(), [
'DD_SERVICE' => 'codeigniter_test_app',
]);
}

public function testScenarioGetReturnString()
Expand Down
6 changes: 4 additions & 2 deletions tests/Integrations/CodeIgniter/V3_1/ExitTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Integrations\CodeIgniter\V3_1;
namespace DDTrace\Tests\Integrations\CodeIgniter\V3_1;

use DDTrace\Tag;
use DDTrace\Tests\Common\SpanAssertion;
Expand All @@ -16,7 +16,9 @@ protected static function getAppIndexScript()

protected static function getEnvs()
{
return array_merge(parent::getEnvs(), ['DD_SERVICE' => 'codeigniter_test_app']);
return array_merge(parent::getEnvs(), [
'DD_SERVICE' => 'codeigniter_test_app',
]);
}

public function testScenarioExit()
Expand Down
4 changes: 3 additions & 1 deletion tests/Integrations/CodeIgniter/V3_1/NoCIControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ protected static function getAppIndexScript()

protected static function getEnvs()
{
return array_merge(parent::getEnvs(), ['DD_SERVICE' => 'codeigniter_test_app']);
return array_merge(parent::getEnvs(), [
'DD_SERVICE' => 'codeigniter_test_app',
]);
}

public function testScenarioHealthCheck()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"resource": "GET /health_check/ping",
"trace_id": 0,
"span_id": 1,
"parent_id": 2339013376397583461,
"parent_id": 13710685105679864928,
"type": "web",
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9efac00000000",
"_dd.p.tid": "660bca4b00000000",
"component": "codeigniter",
"http.method": "GET",
"http.route": "health_check/ping",
"http.status_code": "200",
"http.url": "http://localhost:9999/health_check/ping",
"runtime-id": "7bfd0d33-935d-44b5-adb3-8a3d665d7fc1",
"runtime-id": "ca127e85-a20d-46aa-b510-07e9077a14c9",
"span.kind": "server"
},
"metrics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"resource": "GET /parameterized/paramValue",
"trace_id": 0,
"span_id": 1,
"parent_id": 8242584460457957692,
"parent_id": 7077300158957851981,
"type": "web",
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9f02600000000",
"_dd.p.tid": "660bca4200000000",
"app.endpoint": "Parameterized::customAction",
"component": "codeigniter",
"http.method": "GET",
"http.route": "parameterized/(:any)",
"http.status_code": "200",
"http.url": "http://localhost:9999/parameterized/paramValue",
"runtime-id": "28d30454-75a5-4e9c-8cae-a7343bfe3710",
"runtime-id": "26ab24e6-051f-4e1f-9adf-3d609bef6946",
"span.kind": "server"
},
"metrics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"resource": "GET /simple",
"trace_id": 0,
"span_id": 1,
"parent_id": 11987875517756971343,
"parent_id": 5041262405164109530,
"type": "web",
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9edae00000000",
"_dd.p.tid": "660bca2700000000",
"app.endpoint": "Simple::index",
"component": "codeigniter",
"http.method": "GET",
"http.route": "simple",
"http.status_code": "200",
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
"runtime-id": "cc8c1468-a2a1-4ee5-880f-f1caf51d53ed",
"runtime-id": "26ab24e6-051f-4e1f-9adf-3d609bef6946",
"span.kind": "server"
},
"metrics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"resource": "GET /does_not_exist",
"trace_id": 0,
"span_id": 1,
"parent_id": 13520902578597192405,
"parent_id": 1569360189764723184,
"type": "web",
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9ed6900000000",
"_dd.p.tid": "660bca3700000000",
"component": "codeigniter",
"http.method": "GET",
"http.route": "does_not_exist",
"http.status_code": "404",
"http.status_code": "200",
"http.url": "http://localhost:9999/does_not_exist?key=value&<redacted>",
"runtime-id": "4aab57c3-105b-4ae1-8506-4da606c8ef09",
"runtime-id": "26ab24e6-051f-4e1f-9adf-3d609bef6946",
"span.kind": "server"
},
"metrics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"resource": "GET /error",
"trace_id": 0,
"span_id": 1,
"parent_id": 1162031372790636824,
"parent_id": 14316491551034217378,
"type": "web",
"error": 1,
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9ed6400000000",
"_dd.p.tid": "660bca3200000000",
"app.endpoint": "Error_::index",
"component": "codeigniter",
"error.message": "Uncaught Exception (500): datadog in /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/application/controllers/Error_.php:5",
"error.message": "Uncaught Exception: datadog in /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/application/controllers/Error_.php:5",
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/system/core/CodeIgniter.php(533): Error_->index()\n#1 /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/index.php(315): require_once()\n#2 {main}",
"error.type": "Exception",
"http.method": "GET",
"http.route": "error",
"http.status_code": "500",
"http.status_code": "200",
"http.url": "http://localhost:9999/error?key=value&<redacted>",
"runtime-id": "4aab57c3-105b-4ae1-8506-4da606c8ef09",
"runtime-id": "26ab24e6-051f-4e1f-9adf-3d609bef6946",
"span.kind": "server"
},
"metrics": {
Expand All @@ -38,7 +38,7 @@
"error": 1,
"meta": {
"component": "codeigniter",
"error.message": "Thrown Exception (500): datadog in /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/application/controllers/Error_.php:5",
"error.message": "Thrown Exception: datadog in /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/application/controllers/Error_.php:5",
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/system/core/CodeIgniter.php(533): Error_->index()\n#1 /home/circleci/datadog/tests/Frameworks/CodeIgniter/Version_3_1/index.php(315): require_once()\n#2 {main}",
"error.type": "Exception"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"resource": "GET /simple_view",
"trace_id": 0,
"span_id": 1,
"parent_id": 696982836083391658,
"parent_id": 5481136724631663608,
"type": "web",
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9ef6000000000",
"_dd.p.tid": "660bca2700000000",
"app.endpoint": "Simple_View::index",
"component": "codeigniter",
"http.method": "GET",
"http.route": "simple_view",
"http.status_code": "200",
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
"runtime-id": "9e831e94-6e62-4f5f-adc3-57d8e1936c63",
"runtime-id": "26ab24e6-051f-4e1f-9adf-3d609bef6946",
"span.kind": "server"
},
"metrics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"resource": "GET /exits",
"trace_id": 0,
"span_id": 1,
"parent_id": 18269278339612647463,
"parent_id": 13223261049890104880,
"type": "web",
"meta": {
"_dd.p.dm": "-0",
"_dd.p.tid": "65c9efa500000000",
"_dd.p.tid": "660bca4400000000",
"app.endpoint": "Exits::index",
"component": "codeigniter",
"http.method": "GET",
"http.route": "exits",
"http.status_code": "200",
"http.url": "http://localhost:9999/exits",
"runtime-id": "9720020c-cd25-46fa-9e97-d3838ee03326",
"runtime-id": "de8ed04e-02e4-40ef-be2a-20aeeb1398ef",
"span.kind": "server"
},
"metrics": {
Expand Down

0 comments on commit e9fbe6c

Please sign in to comment.