As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit d9519573 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Improve config specs so they dont rely on config.yml

parent a47f7767
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -5,20 +5,27 @@ describe GitlabConfig do
let(:config) { GitlabConfig.new }
describe :redis do
subject { config.redis }
it { should be_a(Hash) }
it { should have_key('bin') }
it { should have_key('host') }
it { should have_key('port') }
it { should have_key('database') }
it { should have_key('namespace') }
end
describe :redis_namespace do
subject { config.redis_namespace }
before do
config.instance_variable_set(:@config, YAML.load(<<eos
redis:
bin: /usr/bin/redis-cli
host: 127.0.1.1
port: 6378
pass: secure
database: 1
socket: /var/run/redis/redis.sock
namespace: my:gitlab
eos
))
end
it { should eq('resque:gitlab') }
it { config.redis['bin'].should eq('/usr/bin/redis-cli') }
it { config.redis['host'].should eq('127.0.1.1') }
it { config.redis['port'].should eq(6378) }
it { config.redis['database'].should eq(1) }
it { config.redis['namespace'].should eq('my:gitlab') }
it { config.redis['socket'].should eq('/var/run/redis/redis.sock') }
it { config.redis['pass'].should eq('secure') }
end
describe :gitlab_url do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment