Commit 90302eb8 authored by Anastasia McDonald's avatar Anastasia McDonald

Merge branch 'address-technical-debt' into 'master'

Address technical debt on 5_package | Remove deprecated k8s-related test code

See merge request gitlab-org/gitlab!74889
parents 95006217 eca5a94d
......@@ -20,7 +20,7 @@ module QA
end
def set_api_url(api_url)
fill_in 'cluster_platform_kubernetes_attributes_api_url', with: QA::Runtime::Env.cluster_api_url || api_url
fill_in 'cluster_platform_kubernetes_attributes_api_url', with: api_url
end
def set_ca_certificate(ca_certificate)
......
......@@ -15,7 +15,7 @@ module QA
end
def has_package?(name)
has_element?(:package_link, text: name)
has_element?(:package_link, text: name, wait: 20)
end
def has_no_package?(name)
......
......@@ -93,10 +93,6 @@ module QA
ENV['CI'] || ENV['CI_SERVER']
end
def cluster_api_url
ENV['CLUSTER_API_URL']
end
def qa_cookies
ENV['QA_COOKIES'] && ENV['QA_COOKIES'].split(';')
end
......
# frozen_string_literal: true
module QA
module Scenario
module Test
module Integration
class Kubernetes < Test::Instance::All
tags :kubernetes
end
end
end
end
end
# frozen_string_literal: true
module QA
module Scenario
module Test
module Integration
class SSHTunnel < Test::Instance::All
tags :ssh_tunnel
end
end
end
end
end
......@@ -73,6 +73,7 @@ module QA
end
it 'pushes, pulls image to the registry and deletes image blob, manifest and tag', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1819' do
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = api_client
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -82,6 +83,7 @@ module QA
content: gitlab_ci_yaml
}])
end
end
Support::Waiter.wait_until(max_duration: 10) { pipeline_is_triggered? }
......
......@@ -79,6 +79,7 @@ module QA
context "when tls is disabled" do
it "using a #{params[:token_name]}, pushes image and deletes tag", :registry do
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -103,6 +104,7 @@ module QA
YAML
}])
end
end
Flow::Pipeline.visit_latest_pipeline
......@@ -131,6 +133,7 @@ module QA
context "when tls is enabled" do
it "pushes image and deletes tag", :registry_tls, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2378' do
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -162,6 +165,7 @@ module QA
YAML
}])
end
end
Flow::Pipeline.visit_latest_pipeline
......
......@@ -53,6 +53,7 @@ module QA
Flow::Login.sign_in
project.visit!
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -61,6 +62,7 @@ module QA
content: gitlab_ci_yaml
}])
end
end
Flow::Pipeline.visit_latest_pipeline
......
......@@ -82,6 +82,7 @@ module QA
setting.click_save_changes_button
end
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = imported_project
commit.branch = 'online-gc-test-builder-poc'
......@@ -92,6 +93,7 @@ module QA
}])
end
end
end
it 'runs the online garbage collector tool', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1889' do
imported_project.visit!
......
......@@ -46,6 +46,7 @@ module QA
with_them do
it "pulls an image using the dependency proxy" do
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -73,6 +74,7 @@ module QA
YAML
}])
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......
......@@ -70,7 +70,7 @@ module QA
before do
Flow::Login.sign_in
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -84,6 +84,7 @@ module QA
}]
)
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......
......@@ -44,6 +44,7 @@ module QA
it 'publishes, installs, and deletes a Conan package', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1638' do
Flow::Login.sign_in
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -66,6 +67,7 @@ module QA
YAML
}])
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......
......@@ -57,6 +57,7 @@ module QA
before do
Flow::Login.sign_in
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -70,6 +71,7 @@ module QA
}]
)
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......
......@@ -93,12 +93,13 @@ module QA
end
it "pushes and pulls a helm chart" do
# pushing
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = package_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([package_gitlab_ci_file, package_chart_yaml_file])
end
end
package_project.visit!
......@@ -124,12 +125,13 @@ module QA
expect(show).to have_package_info(package_name, package_version)
end
# pulling
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = client_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([client_gitlab_ci_file])
end
end
client_project.visit!
......
......@@ -139,12 +139,13 @@ module QA
end
it "pushes and pulls a maven package via gradle using #{params[:authentication_token_type]}" do
# pushing
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = package_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([package_gitlab_ci_file, package_build_gradle_file])
end
end
package_project.visit!
......@@ -170,12 +171,13 @@ module QA
expect(show).to have_package_info(package_name, package_version)
end
# pulling
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = client_project
commit.commit_message = 'Add .gitlab-ci.yml'
commit.add_files([client_gitlab_ci_file, client_build_gradle_file])
end
end
client_project.visit!
......
......@@ -171,7 +171,7 @@ module QA
end
it "pushes and pulls a maven package via maven using #{params[:authentication_token_type]}" do
# pushing
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = package_project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -181,6 +181,7 @@ module QA
settings_xml
])
end
end
package_project.visit!
......@@ -206,7 +207,7 @@ module QA
expect(show).to have_package_info(package_name, package_version)
end
# pulling
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = client_project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -216,6 +217,7 @@ module QA
settings_xml
])
end
end
client_project.visit!
......@@ -290,6 +292,7 @@ module QA
end
def push_duplicated_package
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = client_project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -300,6 +303,7 @@ module QA
])
end
end
end
def show_latest_deploy_job
client_project.visit!
......
......@@ -156,6 +156,7 @@ module QA
end
it "push and pull a npm package via CI using a #{params[:token_name]}" do
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -164,6 +165,7 @@ module QA
package_json
])
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......@@ -176,6 +178,7 @@ module QA
expect(job).to be_successful(timeout: 800)
end
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = another_project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -183,6 +186,7 @@ module QA
gitlab_ci_install_yaml
])
end
end
another_project.visit!
Flow::Pipeline.visit_latest_pipeline
......
......@@ -9,6 +9,7 @@ module QA
Resource::Project.fabricate_via_api! do |project|
project.name = 'nuget-package-project'
project.template_name = 'dotnetcore'
project.visibility = :private
end
end
......@@ -93,6 +94,7 @@ module QA
it "publishes a nuget package at the project level, installs and deletes it at the group level using a #{params[:token_name]}" do
Flow::Login.sign_in
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -123,6 +125,7 @@ module QA
]
)
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......@@ -137,6 +140,7 @@ module QA
another_project.visit!
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = another_project
commit.commit_message = 'Add new csproj file'
......@@ -182,6 +186,7 @@ module QA
]
)
end
end
Flow::Pipeline.visit_latest_pipeline
......
......@@ -34,6 +34,7 @@ module QA
before do
Flow::Login.sign_in
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml'
......@@ -87,6 +88,7 @@ module QA
}])
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......
......@@ -46,6 +46,7 @@ module QA
it 'publishes and deletes a Ruby gem', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1906' do
Flow::Login.sign_in
Support::Retrier.retry_on_exception(max_attempts: 3, sleep_interval: 2) do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = 'Add package files'
......@@ -132,6 +133,7 @@ module QA
]
)
end
end
project.visit!
Flow::Pipeline.visit_latest_pipeline
......
# frozen_string_literal: true
RSpec.describe QA::Scenario::Test::Integration::Kubernetes do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:kubernetes] }
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment