Use unique branch in each test

parent 07cf6a46
...@@ -37,7 +37,7 @@ module QA ...@@ -37,7 +37,7 @@ module QA
push.file_name = 'test.txt' push.file_name = 'test.txt'
push.file_content = "# This is a test project named #{@project.name}" push.file_content = "# This is a test project named #{@project.name}"
push.commit_message = 'Add test.txt' push.commit_message = 'Add test.txt'
push.branch_name = 'new_branch' push.branch_name = "new_branch_#{SecureRandom.hex(8)}"
push.user = @user push.user = @user
end end
end.to raise_error(QA::Support::Run::CommandError, /You are not allowed to push code to this project/) end.to raise_error(QA::Support::Run::CommandError, /You are not allowed to push code to this project/)
...@@ -48,7 +48,7 @@ module QA ...@@ -48,7 +48,7 @@ module QA
Resource::File.fabricate_via_api! do |file| Resource::File.fabricate_via_api! do |file|
file.api_client = @user_api_client file.api_client = @user_api_client
file.project = @project file.project = @project
file.branch = 'new_branch' file.branch = "new_branch_#{SecureRandom.hex(8)}"
file.commit_message = 'Add new file' file.commit_message = 'Add new file'
file.name = 'test.txt' file.name = 'test.txt'
file.content = "New file" file.content = "New file"
...@@ -61,7 +61,7 @@ module QA ...@@ -61,7 +61,7 @@ module QA
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = @user_api_client commit.api_client = @user_api_client
commit.project = @project commit.project = @project
commit.branch = 'new_branch' commit.branch = "new_branch_#{SecureRandom.hex(8)}"
commit.start_branch = @project.default_branch commit.start_branch = @project.default_branch
commit.commit_message = 'Add new file' commit.commit_message = 'Add new file'
commit.add_files([ commit.add_files([
......
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