diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-10-17 09:31:35 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-10-23 10:36:47 +0200 |
commit | 08cdf65b9e1f5f6fc1f4063a8422c25005868e58 (patch) | |
tree | 12067bd15017d73d824bdc819124fbde026acda9 /spec/support | |
parent | 10bb8297ebe5fc01540b20c3fd365234779b6837 (diff) | |
download | gitlab-ce-08cdf65b9e1f5f6fc1f4063a8422c25005868e58.tar.gz |
Remove broken git storage for testing
Broken storage used to be used to test situations where the Git storage
wasn't being reached. These days we can just mock the Gitaly response.
But given the broken storage is removed now, Gitaly can take over
control of the storage being reachable. If it's not, Gitaly won't boot.
That's nice for situations where a disk wasn't mounted for instance.
Gitaly MR: https://gitlab.com/gitlab-org/gitaly/merge_requests/675
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/test_env.rb | 9 | ||||
-rw-r--r-- | spec/support/stored_repositories.rb | 4 |
2 files changed, 0 insertions, 13 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index 1a9aa252511..71287f28171 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -70,7 +70,6 @@ module TestEnv TMP_TEST_PATH = Rails.root.join('tmp', 'tests', '**') REPOS_STORAGE = 'default'.freeze - BROKEN_STORAGE = 'broken'.freeze # Test environment # @@ -159,10 +158,6 @@ module TestEnv version: Gitlab::GitalyClient.expected_server_version, task: "gitlab:gitaly:install[#{gitaly_dir},#{repos_path}]") do - # Re-create config, to specify the broken storage path - storage_paths = { 'default' => repos_path, 'broken' => broken_path } - Gitlab::SetupHelper.create_gitaly_configuration(gitaly_dir, storage_paths, force: true) - start_gitaly(gitaly_dir) end end @@ -257,10 +252,6 @@ module TestEnv @repos_path ||= Gitlab.config.repositories.storages[REPOS_STORAGE].legacy_disk_path end - def broken_path - @broken_path ||= Gitlab.config.repositories.storages[BROKEN_STORAGE].legacy_disk_path - end - def backup_path Gitlab.config.backup.path end diff --git a/spec/support/stored_repositories.rb b/spec/support/stored_repositories.rb index 6a9ad43941d..55212355daa 100644 --- a/spec/support/stored_repositories.rb +++ b/spec/support/stored_repositories.rb @@ -1,8 +1,4 @@ RSpec.configure do |config| - config.before(:all, :broken_storage) do - FileUtils.rm_rf Gitlab.config.repositories.storages.broken.legacy_disk_path - end - config.before(:each, :broken_storage) do allow(Gitlab::GitalyClient).to receive(:call) do raise GRPC::Unavailable.new('Gitaly broken in this spec') |