diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-06-22 13:37:38 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-06-22 13:37:38 +0300 |
commit | 5331a49d0bc8f6ffd7b16c1b879aee13638dcdae (patch) | |
tree | 95b6606b7ab72f649855e89d0dcd855abd268a97 /spec/migrations | |
parent | 3a3dd539208f75be9b2944c752ac3dc18a1b4306 (diff) | |
parent | 270ca89d9f5c3f5737f372a4f4014a429f5e75ba (diff) |
Merge branch 'master' into fix/gb/improve-updating-column-in-batches-helper
* master: (56 commits)
File view buttons
Don't reset the session when the example failed, because we need capybara-screenshot to have access to it
Resolve "MR comment + system note highlight don't have the same width"
Add feature spec for dashboard state filter tabs
Wording of Mysql support.
a new feature checklist and more elaborate documentation requirements
Filter archived project in API v3 only if param present
Revert to using links instead of buttons in Issuable Index tabs.
Do not run the codeclimate job on docs-only changes
Only show gray footer space if environment actions exist
Migrate Gitlab::Git::Blob.find to Gitaly
Backport filtered search lazy token consistent state fix
Add a comment explaining how the branch clean up happens
Fix Github::Representation::PullRequest#source_branch_exists?
Add CHANGELOG
Fix GitHub importer performance on branch existence check
Rebuild the dynamic path before validating it
Rename stage ref migration specs to match a class name
Enable Style/DotPosition Rubocop :cop:
Revert "Merge branch 'winh-merge-request-related-issues' into 'master'"
...
Conflicts:
db/post_migrate/20170526185921_migrate_build_stage_reference.rb
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/migrate_build_stage_reference_again_spec.rb (renamed from spec/migrations/migrate_build_stage_reference_spec.rb) | 4 | ||||
-rw-r--r-- | spec/migrations/migrate_process_commit_worker_jobs_spec.rb | 54 | ||||
-rw-r--r-- | spec/migrations/turn_nested_groups_into_regular_groups_for_mysql_spec.rb | 18 |
3 files changed, 38 insertions, 38 deletions
diff --git a/spec/migrations/migrate_build_stage_reference_spec.rb b/spec/migrations/migrate_build_stage_reference_again_spec.rb index 80b321860c2..6be480ce58e 100644 --- a/spec/migrations/migrate_build_stage_reference_spec.rb +++ b/spec/migrations/migrate_build_stage_reference_again_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require Rails.root.join('db', 'post_migrate', '20170526185921_migrate_build_stage_reference.rb') +require Rails.root.join('db', 'post_migrate', '20170526190000_migrate_build_stage_reference_again.rb') -describe MigrateBuildStageReference, :migration do +describe MigrateBuildStageReferenceAgain, :migration do ## # Create test data - pipeline and CI/CD jobs. # diff --git a/spec/migrations/migrate_process_commit_worker_jobs_spec.rb b/spec/migrations/migrate_process_commit_worker_jobs_spec.rb index 3db57595fa6..4223d2337a8 100644 --- a/spec/migrations/migrate_process_commit_worker_jobs_spec.rb +++ b/spec/migrations/migrate_process_commit_worker_jobs_spec.rb @@ -11,33 +11,33 @@ describe MigrateProcessCommitWorkerJobs do describe 'Project' do describe 'find_including_path' do it 'returns Project instances' do - expect(described_class::Project.find_including_path(project.id)). - to be_an_instance_of(described_class::Project) + expect(described_class::Project.find_including_path(project.id)) + .to be_an_instance_of(described_class::Project) end it 'selects the full path for every Project' do - migration_project = described_class::Project. - find_including_path(project.id) + migration_project = described_class::Project + .find_including_path(project.id) - expect(migration_project[:path_with_namespace]). - to eq(project.path_with_namespace) + expect(migration_project[:path_with_namespace]) + .to eq(project.path_with_namespace) end end describe '#repository_storage_path' do it 'returns the storage path for the repository' do - migration_project = described_class::Project. - find_including_path(project.id) + migration_project = described_class::Project + .find_including_path(project.id) - expect(File.directory?(migration_project.repository_storage_path)). - to eq(true) + expect(File.directory?(migration_project.repository_storage_path)) + .to eq(true) end end describe '#repository_path' do it 'returns the path to the repository' do - migration_project = described_class::Project. - find_including_path(project.id) + migration_project = described_class::Project + .find_including_path(project.id) expect(File.directory?(migration_project.repository_path)).to eq(true) end @@ -45,11 +45,11 @@ describe MigrateProcessCommitWorkerJobs do describe '#repository' do it 'returns a Rugged::Repository' do - migration_project = described_class::Project. - find_including_path(project.id) + migration_project = described_class::Project + .find_including_path(project.id) - expect(migration_project.repository). - to be_an_instance_of(Rugged::Repository) + expect(migration_project.repository) + .to be_an_instance_of(Rugged::Repository) end end end @@ -73,9 +73,9 @@ describe MigrateProcessCommitWorkerJobs do end it 'skips jobs using a project that no longer exists' do - allow(described_class::Project).to receive(:find_including_path). - with(project.id). - and_return(nil) + allow(described_class::Project).to receive(:find_including_path) + .with(project.id) + .and_return(nil) migration.up @@ -83,9 +83,9 @@ describe MigrateProcessCommitWorkerJobs do end it 'skips jobs using commits that no longer exist' do - allow_any_instance_of(Rugged::Repository).to receive(:lookup). - with(commit.oid). - and_raise(Rugged::OdbError) + allow_any_instance_of(Rugged::Repository).to receive(:lookup) + .with(commit.oid) + .and_raise(Rugged::OdbError) migration.up @@ -99,12 +99,12 @@ describe MigrateProcessCommitWorkerJobs do end it 'encodes data to UTF-8' do - allow_any_instance_of(Rugged::Repository).to receive(:lookup). - with(commit.oid). - and_return(commit) + allow_any_instance_of(Rugged::Repository).to receive(:lookup) + .with(commit.oid) + .and_return(commit) - allow(commit).to receive(:message). - and_return('김치'.force_encoding('BINARY')) + allow(commit).to receive(:message) + .and_return('김치'.force_encoding('BINARY')) migration.up diff --git a/spec/migrations/turn_nested_groups_into_regular_groups_for_mysql_spec.rb b/spec/migrations/turn_nested_groups_into_regular_groups_for_mysql_spec.rb index 175bf1876b2..42109fd0743 100644 --- a/spec/migrations/turn_nested_groups_into_regular_groups_for_mysql_spec.rb +++ b/spec/migrations/turn_nested_groups_into_regular_groups_for_mysql_spec.rb @@ -31,8 +31,8 @@ describe TurnNestedGroupsIntoRegularGroupsForMysql do end it 'adds members of parent groups as members to the migrated group' do - is_member = child_group.members. - where(user_id: member, access_level: Gitlab::Access::DEVELOPER).any? + is_member = child_group.members + .where(user_id: member, access_level: Gitlab::Access::DEVELOPER).any? expect(is_member).to eq(true) end @@ -44,21 +44,21 @@ describe TurnNestedGroupsIntoRegularGroupsForMysql do end it 'renames projects of the nested group' do - expect(updated_project.path_with_namespace). - to eq("#{parent_group.name}-#{child_group.name}/#{updated_project.path}") + expect(updated_project.path_with_namespace) + .to eq("#{parent_group.name}-#{child_group.name}/#{updated_project.path}") end it 'renames the repository of any projects' do - expect(updated_project.repository.path). - to end_with("#{parent_group.name}-#{child_group.name}/#{updated_project.path}.git") + expect(updated_project.repository.path) + .to end_with("#{parent_group.name}-#{child_group.name}/#{updated_project.path}.git") expect(File.directory?(updated_project.repository.path)).to eq(true) end it 'creates a redirect route for renamed projects' do - exists = RedirectRoute. - where(source_type: 'Project', source_id: project.id). - any? + exists = RedirectRoute + .where(source_type: 'Project', source_id: project.id) + .any? expect(exists).to eq(true) end |