Skip to content

Commit

Permalink
NH-66480: update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
xuan-cao-swi committed Jan 22, 2024
1 parent 73a03fb commit 07109a1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ rbenv local 2.7.5
export BUNDLE_GEMFILE=gemfiles/delayed_job.gemfile
export DBTYPE=mysql # optional, defaults to postgresql
bundle
bundle exec rake cfc # download, compile oboe_api, and link liboboe
bundle exec rake cfc['stg'] # download, compile oboe_api, and link liboboe; env: cfc["{env}"] (choose from dev, stg or prod
bundle exec ruby -I test test/queues/delayed_job-client_test.rb
```

Expand Down
24 changes: 22 additions & 2 deletions test/unit/oboe_init_options_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,33 @@
end

it 'checks for metric mode appoptics' do
ENV['SW_APM_COLLECTOR'] = 'collector.abc.bbc.appoptics.com'
ENV['SW_APM_COLLECTOR'] = 'collector.appoptics.com'

SolarWindsAPM::OboeInitOptions.instance.re_init
options = SolarWindsAPM::OboeInitOptions.instance.array_for_oboe

_(options.size).must_equal 21
_(options[20]).must_equal 2
_(options[20]).must_equal 1
end

it 'checks for metric mode appoptics stg' do
ENV['SW_APM_COLLECTOR'] = 'collector-stg.appoptics.com'

SolarWindsAPM::OboeInitOptions.instance.re_init
options = SolarWindsAPM::OboeInitOptions.instance.array_for_oboe

_(options.size).must_equal 21
_(options[20]).must_equal 1
end

it 'checks for metric mode appoptics with port 443' do
ENV['SW_APM_COLLECTOR'] = 'collector.appoptics.com:443'

SolarWindsAPM::OboeInitOptions.instance.re_init
options = SolarWindsAPM::OboeInitOptions.instance.array_for_oboe

_(options.size).must_equal 21
_(options[20]).must_equal 1
end

it 'checks for metric mode nighthack' do
Expand Down

0 comments on commit 07109a1

Please sign in to comment.