diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /qa/spec/runtime/env_spec.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-41fe97390ceddf945f3d967b8fdb3de4c66b7dea.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'qa/spec/runtime/env_spec.rb')
-rw-r--r-- | qa/spec/runtime/env_spec.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb index 0f752ad96b7..22603497019 100644 --- a/qa/spec/runtime/env_spec.rb +++ b/qa/spec/runtime/env_spec.rb @@ -360,36 +360,4 @@ RSpec.describe QA::Runtime::Env do end end end - - describe '.test_resources_created_filepath' do - context 'when not in CI' do - before do - allow(described_class).to receive(:running_in_ci?).and_return(false) - end - - it 'returns default path if QA_TEST_RESOURCES_CREATED_FILEPATH is not defined' do - stub_env('QA_TEST_RESOURCES_CREATED_FILEPATH', nil) - - expect(described_class.test_resources_created_filepath).to include('tmp/test-resources.json') - end - - it 'returns path if QA_TEST_RESOURCES_CREATED_FILEPATH is defined' do - stub_env('QA_TEST_RESOURCES_CREATED_FILEPATH', 'path/to_file') - - expect(described_class.test_resources_created_filepath).to eq('path/to_file') - end - end - - context 'when in CI' do - before do - allow(described_class).to receive(:running_in_ci?).and_return(true) - allow(SecureRandom).to receive(:hex).with(3).and_return('abc123') - stub_env('QA_TEST_RESOURCES_CREATED_FILEPATH', nil) - end - - it 'returns path with random hex in file name' do - expect(described_class.test_resources_created_filepath).to include('tmp/test-resources-abc123.json') - end - end - end end |