From daf5ae5bd439f1f32363d410129d5b9e73fbb539 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 26 Aug 2022 14:36:54 +0000 Subject: Add latest changes from gitlab-org/security/gitlab@15-3-stable-ee --- .../pypi/pypi_upload_install_package.yaml.erb | 2 +- .../5_package/package_registry/pypi_repository_spec.rb | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'qa') diff --git a/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb b/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb index 3ea71152801..87c01fb5477 100644 --- a/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb +++ b/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb @@ -16,4 +16,4 @@ install: script: - "pip install <%= package.name %> --no-deps --index-url <%= uri.scheme %>://<%= personal_access_token %>:<%= personal_access_token %>@<%= gitlab_host_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple --trusted-host <%= gitlab_host_with_port %>" tags: - - runner-for-<%= project.name %> \ No newline at end of file + - runner-for-<%= project.name %> diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb index 4614eced300..22d76d684e5 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb @@ -30,9 +30,16 @@ module QA end let(:uri) { URI.parse(Runtime::Scenario.gitlab_address) } - let(:gitlab_address_with_port) { "#{uri.scheme}://#{uri.host}:#{uri.port}" } - let(:gitlab_host_with_port) { "#{uri.host}:#{uri.port}" } let(:personal_access_token) { use_ci_variable(name: 'PERSONAL_ACCESS_TOKEN', value: Runtime::Env.personal_access_token, project: project) } + let(:gitlab_address_with_port) { "#{uri.scheme}://#{uri.host}:#{uri.port}" } + let(:gitlab_host_with_port) do + # Don't specify port if it is a standard one + if uri.port == 80 || uri.port == 443 + uri.host + else + "#{uri.host}:#{uri.port}" + end + end before do Flow::Login.sign_in -- cgit v1.2.3