Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNeumann committed Apr 17, 2024
1 parent 9081863 commit 3828501
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
/*SKIPIF
<?php
require("skipif.inc");
if (version_compare(PHP_VERSION, "8.0", ">=")) {
die("skip: PHP >= 8.0 not supported\n");
}
*/

/*EXPECT_METRICS
Expand All @@ -32,6 +35,11 @@
[{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/framework/Drupal/forced"}, [1, 0, 0, 0, 0, 0]],
[{"name":"External/127.0.0.1/all"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"External/all"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"External/allOther"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"External/127.0.0.1/all",
"scope":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]]
]
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

/*DESCRIPTION
Test that adding cross process headers doesn't blow up if the second parameter
is bogus.
*/

// force the framework to avoid requiring the drupal detection file
/*INI
newrelic.framework = drupal
newrelic.distributed_tracing_enabled=0
*/

/*SKIPIF
<?php
require("skipif.inc");
if (version_compare(PHP_VERSION, "8.0", "<")) {
die("skip: PHP < 8.0 not supported\n");
}
*/

/*EXPECT_METRICS
[
"?? agent run id",
"?? timeframe start",
"?? timeframe stop",
[
[{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Errors/OtherTransaction/php__FILE__"}, [1, 0, 0, 0, 0, 0]],
[{"name":"Errors/all"}, [1, 0, 0, 0, 0, 0]],
[{"name":"Errors/allOther"}, [1, 0, 0, 0, 0, 0]],
[{"name":"OtherTransaction/all"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/framework/Drupal/forced"}, [1, 0, 0, 0, 0, 0]],
[{"name":"Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]]
]
]
*/


require_once(realpath(dirname(__FILE__)) . '/../../../include/drupal_7_bootstrap.inc');
require_once(realpath(dirname(__FILE__)) . '/../../../include/drupal_7_common.inc');
require_once(realpath(dirname(__FILE__)) . '/../../../include/config.php');

$url = "http://" . $EXTERNAL_HOST;

drupal_http_request($url, array("headers" => 22));
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
/*SKIPIF
<?php
require("skipif.inc");
if (version_compare(PHP_VERSION, "8.0", ">=")) {
die("skip: PHP >= 8.0 not supported\n");
}
*/

/*EXPECT_METRICS
Expand All @@ -32,6 +35,11 @@
[{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/framework/Drupal/forced"}, [1, 0, 0, 0, 0, 0]],
[{"name":"External/127.0.0.1/all"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"External/all"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"External/allOther"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"External/127.0.0.1/all",
"scope":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]]
]
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

/*DESCRIPTION
Test that adding cross process headers doesn't blow up if the second parameter
is bogus.
*/

// force the framework to avoid requiring the drupal detection file
/*INI
newrelic.framework = drupal
newrelic.distributed_tracing_enabled=0
*/

/*SKIPIF
<?php
require("skipif.inc");
if (version_compare(PHP_VERSION, "8.0", "<")) {
die("skip: PHP < 8.0 not supported\n");
}
*/

/*EXPECT_METRICS
[
"?? agent run id",
"?? timeframe start",
"?? timeframe stop",
[
[{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Errors/OtherTransaction/php__FILE__"}, [1, 0, 0, 0, 0, 0]],
[{"name":"Errors/all"}, [1, 0, 0, 0, 0, 0]],
[{"name":"Errors/allOther"}, [1, 0, 0, 0, 0, 0]],
[{"name":"OtherTransaction/all"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
[{"name":"Supportability/framework/Drupal/forced"}, [1, 0, 0, 0, 0, 0]],
[{"name":"Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]]
]
]
*/


require_once(realpath(dirname(__FILE__)) . '/../../../include/drupal_7_bootstrap.inc');
require_once(realpath(dirname(__FILE__)) . '/../../../include/drupal_7_common.inc');
require_once(realpath(dirname(__FILE__)) . '/../../../include/config.php');

$url = "http://" . $EXTERNAL_HOST;

drupal_http_request($url, array("headers" => NULL));

0 comments on commit 3828501

Please sign in to comment.