diff options
Diffstat (limited to 'spec/lib/gitlab/tracking')
-rw-r--r-- | spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb b/spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb index 2554a15d97e..48092a33da3 100644 --- a/spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb +++ b/spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb @@ -48,40 +48,8 @@ RSpec.describe Gitlab::Tracking::Destinations::SnowplowMicro do allow(Gitlab.config).to receive(:snowplow_micro).and_raise(Settingslogic::MissingSetting) end - context 'when SNOWPLOW_MICRO_URI has scheme and port' do - before do - stub_env('SNOWPLOW_MICRO_URI', 'http://gdk.test:9091') - end - - it 'returns hostname URI part' do - expect(subject.hostname).to eq('gdk.test:9091') - end - end - - context 'when SNOWPLOW_MICRO_URI is without protocol' do - before do - stub_env('SNOWPLOW_MICRO_URI', 'gdk.test:9091') - end - - it 'returns hostname URI part' do - expect(subject.hostname).to eq('gdk.test:9091') - end - end - - context 'when SNOWPLOW_MICRO_URI is hostname only' do - before do - stub_env('SNOWPLOW_MICRO_URI', 'uriwithoutport') - end - - it 'returns hostname URI with default HTTP port' do - expect(subject.hostname).to eq('uriwithoutport:80') - end - end - - context 'when SNOWPLOW_MICRO_URI is not set' do - it 'returns localhost hostname' do - expect(subject.hostname).to eq('localhost:9090') - end + it 'returns localhost hostname' do + expect(subject.hostname).to eq('localhost:9090') end end end |