Commit 4af77a62 authored by Tomislav Nikić's avatar Tomislav Nikić Committed by Sanad Liaquat

Created a simple test for the mTLS scenario

This test does nothing more than create a project with a readme.
parent 41a7b3e2
# frozen_string_literal: true
module QA
RSpec.describe 'Create' do
context 'Gitaly', :orchestrated, :mtls do
describe 'Using mTLS' do
let(:intial_commit_message) { 'Initial commit' }
let(:first_added_commit_message) { 'commit over git' }
let(:second_added_commit_message) { 'commit over api' }
it 'pushes to gitaly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1118' do
project = Resource::Project.fabricate! do |project|
project.name = "mTLS"
project.initialize_with_readme = true
end
Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project
push.new_branch = false
push.commit_message = first_added_commit_message
push.file_content = 'First commit'
end
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.commit_message = second_added_commit_message
commit.add_files([
{
file_path: "file-#{SecureRandom.hex(8)}",
content: 'Second commit'
}
])
end
expect(project.commits.map { |commit| commit[:message].chomp })
.to include(intial_commit_message)
.and include(first_added_commit_message)
.and include(second_added_commit_message)
end
end
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