Update Telemetry logic to remove warnings and relocate
What does this merge request do and why?
This MR updates where the Telemetry
class lives to be consistent with other GDK modules/classes. It also fixes a bunch of warnings when running specs.
Before
$ make rspec
Bundle check passed.
RSpec: ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................WARNING: An expectation of `:identify` was set on `nil`. To allow expectations on `nil` and suppress this message, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `false`. Called from /Users/ash/src/gitlab/gitlab-development-kit/spec/lib/gdk/telemetry_spec.rb:34:in `block (3 levels) in <top (required)>'.
WARNING: An expectation of `:track` was set on `nil`. To allow expectations on `nil` and suppress this message, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `false`. Called from /Users/ash/src/gitlab/gitlab-development-kit/spec/lib/gdk/telemetry_spec.rb:35:in `block (3 levels) in <top (required)>'.
WARNING: An expectation of `:track` was set on `nil`. To allow expectations on `nil` and suppress this message, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `false`. Called from /Users/ash/src/gitlab/gitlab-development-kit/spec/lib/gdk/telemetry_spec.rb:36:in `block (3 levels) in <top (required)>'.
..WARNING: An expectation of `:identify` was set on `nil`. To allow expectations on `nil` and suppress this message, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `false`. Called from /Users/ash/src/gitlab/gitlab-development-kit/spec/lib/gdk/telemetry_spec.rb:43:in `block (4 levels) in <top (required)>'.
WARNING: An expectation of `:track` was set on `nil`. To allow expectations on `nil` and suppress this message, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `false`. Called from /Users/ash/src/gitlab/gitlab-development-kit/spec/lib/gdk/telemetry_spec.rb:44:in `block (4 levels) in <top (required)>'.
WARNING: An expectation of `:track` was set on `nil`. To allow expectations on `nil` and suppress this message, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `RSpec::Mocks.configuration.allow_message_expectations_on_nil` to `false`. Called from /Users/ash/src/gitlab/gitlab-development-kit/spec/lib/gdk/telemetry_spec.rb:45:in `block (4 levels) in <top (required)>'.
.................................................................................................................................................
Finished in 15.69 seconds (files took 0.82402 seconds to load)
1103 examples, 0 failures
After
$ make rspec
Bundle check passed.
RSpec: ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 15.66 seconds (files took 0.85794 seconds to load)
1103 examples, 0 failures
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Closes #1997 (closed)
Edited by Ash McKenzie