Skip to content

Commit 9a0327f

Browse files
authored
Ignore cert verification in MapR tests (DataDog#21449)
* Ignore cert verification in MapR tests * Lint * use 'curl -k'
1 parent df24398 commit 9a0327f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

mapr/tests/conftest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,20 @@
2020
# This requires adding confluent's APT repositories. These steps are based on the docs in
2121
# - https://docs.confluent.io/platform/current/installation/installing_cp/deb-ubuntu.html#get-the-software
2222
# - https://github.com/confluentinc/librdkafka#installing-prebuilt-packages
23-
"sh -c 'curl https://packages.confluent.io/deb/7.0/archive.key "
23+
# Use wget with --no-check-certificate to handle certificate issues
24+
"sh -c 'curl -k https://packages.confluent.io/deb/7.0/archive.key"
2425
"| gpg --dearmor -o /usr/share/keyrings/confluent.gpg'",
2526
"sh -c 'echo "
2627
"\"deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/confluent.gpg] "
2728
"https://packages.confluent.io/clients/deb $(lsb_release -cs) main\" "
2829
"> /etc/apt/sources.list.d/confluent.list'",
30+
# Configure apt to ignore certificate verification issues for this repository
31+
'sh -c "echo \'Acquire::https::packages.confluent.io::Verify-Peer "false";\' > /etc/apt/apt.conf.d/99confluent-verify-peer"', # noqa: E501
32+
'sh -c "echo \'Acquire::https::packages.confluent.io::Verify-Host "false";\' >> /etc/apt/apt.conf.d/99confluent-verify-peer"', # noqa: E501
2933
'apt-get update',
34+
# Install librdkafka-dev (latest available version)
3035
'apt-get install -y librdkafka-dev',
31-
# Finally, we can install the package
36+
# Finally, we can install the package with architecture-specific flags
3237
'/opt/datadog-agent/embedded/bin/pip install mapr-streams-python',
3338
]
3439
}

0 commit comments

Comments
 (0)