# DEP-8 autopkgtest control file
# https://salsa.debian.org/ci-team/autopkgtest/-/blob/main/doc/README.package-tests.rst
#
# Tests are run by Launchpad after a successful build.
# Test-Command: runs an inline shell command; no separate test script file needed.
# "@" in Depends is replaced with all binary packages from this source package.

# ---------------------------------------------------------------------------
# opentelemetry-injector
# ---------------------------------------------------------------------------

Test-Command: test -f /usr/lib/opentelemetry/injector/libotelinject.so && test -f /etc/opentelemetry/injector/injector.conf && test -f /etc/opentelemetry/injector/default_env.conf && test -d /etc/opentelemetry/injector/conf.d
Restrictions: superficial

Test-Command: grep -q /usr/lib/opentelemetry/injector/libotelinject.so /etc/ld.so.preload
Restrictions: superficial

Test-Command: objdump -f /usr/lib/opentelemetry/injector/libotelinject.so
Depends: @, binutils
Restrictions: superficial

# ---------------------------------------------------------------------------
# Lifecycle tests
# ---------------------------------------------------------------------------
# These tests exercise package install/remove/purge behavior and require
# root privileges and an isolated testbed because they modify system state.

Tests: preload-management
Restrictions: needs-root, breaks-testbed, allow-stderr

Tests: config-handling
Restrictions: needs-root, breaks-testbed, allow-stderr
