Skip to content

Commit

Permalink
Merge pull request #4797 from HuijingHei/proxy-test
Browse files Browse the repository at this point in the history
proxy-test: verify proxy environment works
  • Loading branch information
HuijingHei authored Jan 26, 2024
2 parents ec6b2e0 + b166406 commit 063ee01
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/kolainst/nondestructive/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,20 @@ echo "ok usroverlay"
rpm-ostree deploy --register-driver "foo"
rpm-ostree status > status.txt
assert_file_has_content status.txt "AutomaticUpdatesDriver: foo"

# Verify with wrong proxy, rpm-ostree rebase failed as expected
# https://issues.redhat.com/browse/OCPBUGS-27200
mkdir -p /etc/systemd/system/rpm-ostreed.service.d
cat > /etc/systemd/system/rpm-ostreed.service.d/http-proxy.conf << EOF
[Service]
Environment="http_proxy=http://test123.com:3128"
Environment="https_proxy=https://test123.com:3128"
EOF
systemctl daemon-reload
systemctl restart rpm-ostreed.service
if rpm-ostree rebase ostree-unverified-registry:quay.io/fedora/fedora-coreos:testing-devel &> err.txt; then
echo "should not success with wrong proxy"
exit 1
fi
assert_file_has_content_literal err.txt "proxyconnect tcp: dial tcp: lookup test123.com"
echo "ok proxy"

0 comments on commit 063ee01

Please sign in to comment.