diff --git a/internal/buildscripts/packaging/tests/installer_test.py b/internal/buildscripts/packaging/tests/installer_test.py index ed508a237b..8ed629cb46 100644 --- a/internal/buildscripts/packaging/tests/installer_test.py +++ b/internal/buildscripts/packaging/tests/installer_test.py @@ -397,6 +397,7 @@ def test_installer_with_instrumentation_default(distro, arch, method): print(f"Testing installation on {distro} from {STAGE} stage ...") dockerfile = get_instrumentation_dockerfile(distro) + print(f"Using dockerfile {dockerfile}") with run_distro_container(distro, dockerfile=dockerfile, arch=arch, buildargs=buildargs) as container: copy_file_into_container(container, INSTALLER_PATH, "/test/install.sh") run_container_cmd(container, f"sh -c 'echo \"# This line should be preserved\" >> {PRELOAD_PATH}'") @@ -407,6 +408,12 @@ def test_installer_with_instrumentation_default(distro, arch, method): # npm installed with node v16 only supports python 3.6+, but these distros only provide python 3.5 # downgrade npm to support python 3.5 in order to build/compile splunk-otel-js run_container_cmd(container, "bash -l -c 'npm install --global npm@^6'") + if distro in ("opensuse-15", ): + # This really, really shouldn't be needed + run_container_cmd(container, "zypper -n install -y procps") + run_container_cmd(container, "pgrep --help") + run_container_cmd(container, "pgrep -f init") + # set global=true for npm to test that splunk-otel-js is still installed locally run_container_cmd(container, "sh -l -c 'npm config set global true'") diff --git a/internal/buildscripts/packaging/tests/package_test.py b/internal/buildscripts/packaging/tests/package_test.py index 178ab2679f..2b4af1e483 100644 --- a/internal/buildscripts/packaging/tests/package_test.py +++ b/internal/buildscripts/packaging/tests/package_test.py @@ -61,7 +61,7 @@ def get_package(distro, name, path, arch): return None -def get_libcap_command(container): +def get_extra_deps_command(container): if container.exec_run("command -v yum").exit_code == 0: return "yum install -y libcap" elif container.exec_run("command -v dnf").exit_code == 0: @@ -112,7 +112,7 @@ def test_collector_package_install(distro, arch): with run_distro_container(distro, arch) as container: # install setcap dependency if distro in RPM_DISTROS: - run_container_cmd(container, get_libcap_command(container)) + run_container_cmd(container, get_extra_deps_command(container)) else: run_container_cmd(container, "apt-get update") run_container_cmd(container, "apt-get install -y libcap2-bin")