Description: Skip tests changing the proxy settings in autopkgtest environment
  This test is failing in the Ubuntu autopkgtest infrastructure because it tries
  to set the proxy variable which is already used by the infrastructure which
  makes it fail. This is a Ubuntu specific change.
  .
  Even with this patch the tests will be executed during build time to make
  sure the feature is still working.
Author: Lucas Kanashiro <kanashiro@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/r10k/+bug/1940104
Forwarded: not-needed
Last-Updated: 2021-08-16

--- a/spec/unit/settings_spec.rb
+++ b/spec/unit/settings_spec.rb
@@ -271,9 +271,11 @@ describe R10K::Settings do
       describe "setting a default value" do
         %w[HTTPS_PROXY https_proxy HTTP_PROXY http_proxy].each do |env_var|
           it "respects the #{env_var} environment variable" do
-            R10K::Util::ExecEnv.withenv(env_var => "http://proxy.value/#{env_var}") do
-              output = subject.evaluate({})
-              expect(output[:proxy]).to eq("http://proxy.value/#{env_var}")
+            if not ENV["AUTOPKGTEST_TMP"]
+              R10K::Util::ExecEnv.withenv(env_var => "http://proxy.value/#{env_var}") do
+                output = subject.evaluate({})
+                expect(output[:proxy]).to eq("http://proxy.value/#{env_var}")
+              end
             end
           end
         end
