summaryrefslogtreecommitdiff
path: root/spec/integration/python
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-23 15:36:17 -0600
committermo khan <mo.khan@gmail.com>2020-04-03 16:28:53 -0600
commit93f7c568e1104936de011626d3bd7f56ebe66355 (patch)
treead7b589d18aec83d4f09d0e64b75e1581c85589b /spec/integration/python
parent93a00df11d79c9f59141ff42ce05ab3b3d329375 (diff)
Install root certificate
* Install certificate in root ca trust store * Use PIP_CERT environment variable to specify path to the certificate bundle * Do not override user provided PIP_CERT * Perform shallow clone when possible * Update CHANGELOG and bump version
Diffstat (limited to 'spec/integration/python')
-rw-r--r--spec/integration/python/pipenv_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/integration/python/pipenv_spec.rb b/spec/integration/python/pipenv_spec.rb
index 410d3c7..9ec7d96 100644
--- a/spec/integration/python/pipenv_spec.rb
+++ b/spec/integration/python/pipenv_spec.rb
@@ -201,4 +201,29 @@ RSpec.describe "pipenv" do
end
end
end
+
+ context "when connecting to a private package repository with self signed certificate" do
+ let(:index_url) { "https://gitlab-airgap-pypi.us-west1-b.c.group-secure-a89fe7.internal/simple" }
+ let(:bundle) { fixture_file_content('python/pypi.crt') }
+
+ def install_airgap_hosts
+ add_host('gitlab-airgap-test.us-west1-b.c.group-secure-a89fe7.internal', '34.82.7.216')
+ add_host('gitlab-airgap-pypi.us-west1-b.c.group-secure-a89fe7.internal', '35.227.149.218')
+ end
+
+ before do
+ runner.add_file('Pipfile', fixture_file_content('python/airgap-Pipfile.erb', index_url: index_url))
+ runner.add_file('Pipfile.lock', fixture_file_content('python/airgap-Pipfile.lock.erb', index_url: index_url))
+ end
+
+ pending 'downloads the packages and trusts the certificate' do
+ report = runner.scan(env: {
+ 'ADDITIONAL_CA_CERT_BUNDLE' => bundle,
+ 'PIP_INDEX_URL' => index_url
+ })
+
+ expect(report).to match_schema(version: '2.0')
+ expect(report.dependency_names).to include('requests')
+ end
+ end
end