Skip to content

Commit 847cfbb

Browse files
fix(ci): isolate integration tests from Fabric proxy
1 parent b8637f7 commit 847cfbb

5 files changed

Lines changed: 10 additions & 3 deletions

File tree

.gitlab/generate-appsec.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
-DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_CXX_LINK_FLAGS='-stdlib=libc++'
101101
-DDD_APPSEC_TESTING=ON -DBOOST_CACHE_PREFIX=$CI_PROJECT_DIR/boost-cache
102102
-DENABLE_ASAN=$ASAN_FLAG"
103-
# The Fabric proxy changes curl test behavior and leaks HTTP_PROXY into $_SERVER.
103+
# The Fabric proxy changes network failure semantics and leaks HTTP_PROXY into $_SERVER.
104104
- unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
105105
- ASAN_OPTIONS=malloc_context_size=0 make -j 4 xtest
106106

@@ -359,6 +359,8 @@
359359
-DBOOST_CACHE_PREFIX="$CI_PROJECT_DIR/boost-cache"
360360
- |
361361
export PATH=$PATH:$HOME/.cargo/bin
362+
# The Fabric proxy changes network failure semantics and leaks HTTP_PROXY into $_SERVER.
363+
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
362364
LLVM_PROFILE_FILE="/tmp/cov-ext/%p.profraw" \
363365
VERBOSE=1 make -j 4 xtest
364366
- VERBOSE=1 make -j 4 ddappsec_helper_test

.gitlab/generate-package.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,8 @@ function appsec_image_from_tag_mapping(string $tag): string
12171217
- pecl install datadog_trace.tgz
12181218
- echo "extension=ddtrace.so" | sudo tee $(php -i | awk -F"=> " '/Scan this dir for additional .ini files/ {print $2}')/ddtrace.ini
12191219
- php --ri=ddtrace
1220+
# The Fabric proxy changes network failure semantics in PECL tests.
1221+
- unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
12201222
- TERM=dumb HTTPBIN_HOSTNAME=httpbin-integration HTTPBIN_PORT=8080 DATADOG_HAVE_DEV_ENV=1 DD_TRACE_GIT_METADATA_ENABLED=0 pecl run-tests --showdiff --ini=" -d datadog.trace.sources_path=" -p datadog_trace
12211223
after_script:
12221224
- mkdir artifacts

.gitlab/generate-profiler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@
165165
- "if php -r 'exit(PHP_VERSION_ID < 80400 ? 0 : 1);'; then cat profiling/tests/php-language-xfail-pre84.list >> /tmp/profiler-php-language-xfail.list; fi"
166166
- export XFAIL_LIST=/tmp/profiler-php-language-xfail.list
167167
- ulimit -c unlimited
168-
# The Fabric proxy changes curl test behavior and leaks HTTP_PROXY into $_SERVER.
169-
- unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
170168
- .gitlab/run_php_language_tests.sh
171169
after_script:
172170
- |

.gitlab/generate-tracer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ function before_script_steps($with_docker_auth = false) {
571571
- make composer_tests_update
572572
- .gitlab/wait-for-service-ready.sh
573573
script:
574+
# The Fabric proxy changes network failure semantics in integration tests.
575+
- unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
574576
- DD_TRACE_AGENT_TIMEOUT=1000 make $MAKE_TARGET RUST_DEBUG_BUILD=1 PHPUNIT_JUNIT="artifacts/tests/results.xml" <?= ASSERT_NO_MEMLEAKS ?>
575577
<?php after_script(".", true); ?>
576578
- find tests -type f \( -name 'phpunit_error.log' -o -name 'nginx_*.log' -o -name 'apache_*.log' -o -name 'php_fpm_*.log' -o -name 'dd_php_error.log' \) -exec cp --parents '{}' artifacts \;

.gitlab/run_php_language_tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22
set -eo pipefail
33

4+
# The Fabric proxy changes network failure semantics and leaks HTTP_PROXY into $_SERVER.
5+
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
6+
47
# Helper to parse version strings for comparison
58
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
69

0 commit comments

Comments
 (0)