Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-07-26 21:10:14 +00:00
parent 013a89081d
commit 34e1ff85f2
8 changed files with 25 additions and 29 deletions

View file

@ -341,7 +341,6 @@ Layout/FirstHashElementIndentation:
- 'spec/features/gitlab_experiments_spec.rb'
- 'spec/frontend/fixtures/autocomplete_sources.rb'
- 'spec/frontend/fixtures/blob.rb'
- 'spec/frontend/fixtures/runner.rb'
- 'spec/graphql/mutations/release_asset_links/create_spec.rb'
- 'spec/graphql/resolvers/concerns/caching_array_resolver_spec.rb'
- 'spec/graphql/types/ci/detailed_status_type_spec.rb'

View file

@ -4440,7 +4440,6 @@ Layout/LineLength:
- 'spec/frontend/fixtures/merge_requests_diffs.rb'
- 'spec/frontend/fixtures/pipeline_schedules.rb'
- 'spec/frontend/fixtures/projects.rb'
- 'spec/frontend/fixtures/runner.rb'
- 'spec/frontend/fixtures/snippet.rb'
- 'spec/graphql/features/feature_flag_spec.rb'
- 'spec/graphql/gitlab_schema_spec.rb'

View file

@ -44,7 +44,6 @@ RSpec/RepeatedExampleGroupDescription:
- 'spec/features/projects/pipelines/legacy_pipeline_spec.rb'
- 'spec/features/security/project/private_access_spec.rb'
- 'spec/finders/ci/pipelines_for_merge_request_finder_spec.rb'
- 'spec/frontend/fixtures/runner.rb'
- 'spec/frontend/fixtures/startup_css.rb'
- 'spec/helpers/admin/user_actions_helper_spec.rb'
- 'spec/helpers/dropdowns_helper_spec.rb'

View file

@ -13,11 +13,12 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
let_it_be(:project) { create(:project, :repository, :public) }
let_it_be(:project_2) { create(:project, :repository, :public) }
let_it_be(:instance_runner) { create(:ci_runner, :instance, version: '1.0.0', description: 'Instance runner', ip_address: '127.0.0.1') }
let_it_be(:group_runner) { create(:ci_runner, :group, groups: [group], active: false, version: '2.0.0', description: 'Group runner', ip_address: '127.0.0.1') }
let_it_be(:group_runner_2) { create(:ci_runner, :group, groups: [group], active: false, version: '2.0.0', description: 'Group runner 2', ip_address: '127.0.0.1') }
let_it_be(:project_runner) { create(:ci_runner, :project, projects: [project, project_2], active: false, version: '2.0.0', description: 'Project runner', ip_address: '127.0.0.1') }
let_it_be(:build) { create(:ci_build, runner: instance_runner) }
let_it_be(:runner) { create(:ci_runner, :instance, description: 'My Runner', version: '1.0.0') }
let_it_be(:group_runner) { create(:ci_runner, :group, groups: [group], version: '2.0.0') }
let_it_be(:group_runner_2) { create(:ci_runner, :group, groups: [group], version: '2.0.0') }
let_it_be(:project_runner) { create(:ci_runner, :project, projects: [project, project_2], version: '2.0.0') }
let_it_be(:build) { create(:ci_build, runner: runner) }
query_path = 'runner/graphql/'
fixtures_path = 'graphql/runner/'
@ -32,13 +33,13 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
.and_return([nil, :not_available])
end
describe do
describe 'as admin', GraphQL::Query do
before do
sign_in(admin)
enable_admin_mode!(admin)
end
describe GraphQL::Query, type: :request do
describe 'all_runners.query.graphql', type: :request do
all_runners_query = 'list/all_runners.query.graphql'
let_it_be(:query) do
@ -58,7 +59,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
end
end
describe GraphQL::Query, type: :request do
describe 'all_runners_count.query.graphql', type: :request do
all_runners_count_query = 'list/all_runners_count.query.graphql'
let_it_be(:query) do
@ -72,7 +73,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
end
end
describe GraphQL::Query, type: :request do
describe 'runner.query.graphql', type: :request do
runner_query = 'show/runner.query.graphql'
let_it_be(:query) do
@ -81,7 +82,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
it "#{fixtures_path}#{runner_query}.json" do
post_graphql(query, current_user: admin, variables: {
id: instance_runner.to_global_id.to_s
id: runner.to_global_id.to_s
})
expect_graphql_errors_to_be_empty
@ -96,7 +97,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
end
end
describe GraphQL::Query, type: :request do
describe 'runner_projects.query.graphql', type: :request do
runner_projects_query = 'show/runner_projects.query.graphql'
let_it_be(:query) do
@ -112,7 +113,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
end
end
describe GraphQL::Query, type: :request do
describe 'runner_jobs.query.graphql', type: :request do
runner_jobs_query = 'show/runner_jobs.query.graphql'
let_it_be(:query) do
@ -121,14 +122,14 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
it "#{fixtures_path}#{runner_jobs_query}.json" do
post_graphql(query, current_user: admin, variables: {
id: instance_runner.to_global_id.to_s
id: runner.to_global_id.to_s
})
expect_graphql_errors_to_be_empty
end
end
describe GraphQL::Query, type: :request do
describe 'runner_form.query.graphql', type: :request do
runner_jobs_query = 'edit/runner_form.query.graphql'
let_it_be(:query) do
@ -137,7 +138,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
it "#{fixtures_path}#{runner_jobs_query}.json" do
post_graphql(query, current_user: admin, variables: {
id: instance_runner.to_global_id.to_s
id: runner.to_global_id.to_s
})
expect_graphql_errors_to_be_empty
@ -145,14 +146,14 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
end
end
describe do
describe 'as group owner', GraphQL::Query do
let_it_be(:group_owner) { create(:user) }
before do
group.add_owner(group_owner)
end
describe GraphQL::Query, type: :request do
describe 'group_runners.query.graphql', type: :request do
group_runners_query = 'list/group_runners.query.graphql'
let_it_be(:query) do
@ -177,7 +178,7 @@ RSpec.describe 'Runner (JavaScript fixtures)' do
end
end
describe GraphQL::Query, type: :request do
describe 'group_runners_count.query.graphql', type: :request do
group_runners_count_query = 'list/group_runners_count.query.graphql'
let_it_be(:query) do

View file

@ -94,10 +94,10 @@ describe('AdminRunnerShowApp', () => {
});
it('shows basic runner details', async () => {
const expected = `Description Instance runner
const expected = `Description My Runner
Last contact Never contacted
Version 1.0.0
IP Address 127.0.0.1
IP Address None
Executor None
Architecture None
Platform darwin

View file

@ -88,9 +88,7 @@ describe('RunnerList', () => {
createComponent({}, mountExtended);
// Badges
expect(findCell({ fieldKey: 'status' }).text()).toMatchInterpolatedText(
'never contacted paused',
);
expect(findCell({ fieldKey: 'status' }).text()).toMatchInterpolatedText('never contacted');
// Runner summary
expect(findCell({ fieldKey: 'summary' }).text()).toContain(

View file

@ -92,10 +92,10 @@ describe('GroupRunnerShowApp', () => {
});
it('shows basic runner details', () => {
const expected = `Description Instance runner
const expected = `Description My Runner
Last contact Never contacted
Version 1.0.0
IP Address 127.0.0.1
IP Address None
Executor None
Architecture None
Platform darwin

View file

@ -58,7 +58,7 @@ RSpec.describe Gitlab::GithubImport::Importer::Events::CrossReferenced, :clean_g
allow(user_finder).to receive(:find).with(user.id, user.username).and_return(user.id)
end
it 'creates expected note' do
it 'creates expected note', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/368827' do
importer.execute(issue_event)
expect(issue.notes.count).to eq 1