Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if env variable exists before setting up SimpleCov #759

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

estolfo
Copy link
Contributor

@estolfo estolfo commented Apr 8, 2020

ENV["TEST_MATRIX"] is defined on Jenkins so there's no problem with this code in CI.
When running tests locally, there is an error because the env variable doesn't exist.

$ rspec

An error occurred while loading spec_helper.
Failure/Error: SimpleCov.coverage_dir("coverage/matrix_results/" + ENV["TEST_MATRIX"])

TypeError:
  no implicit conversion of nil into String
# ./spec/spec_helper.rb:3:in `+'
# ./spec/spec_helper.rb:3:in `<top (required)>'
No examples found.

@cachedout
Copy link
Contributor

Ah! Good catch. Thank you!

@estolfo
Copy link
Contributor Author

estolfo commented Apr 8, 2020

no worries!

@estolfo estolfo force-pushed the simple-cov branch 2 times, most recently from ff0405a to 6b85e75 Compare April 8, 2020 12:49
@estolfo estolfo changed the title Check if simplecov directory exists before referring to it Check if env variable exists before setting up SimpleCov Apr 8, 2020
@estolfo estolfo merged commit 067d5ef into elastic:master Apr 8, 2020
v1v added a commit to v1v/apm-agent-ruby that referenced this pull request Apr 21, 2020
…release

* upstream/master: (24 commits)
  Ensure that a new central config fetch is scheduled after network error (elastic#772)
  Updates to Resque support and documentation (elastic#768)
  Support recording config option (elastic#765)
  Add tests and adjustments to classes that can be restarted (elastic#766)
  Ensure that the running agent's config is used when restarted (elastic#763)
  The enabled tag is config-enabled
  Add enabled config option replacing active (elastic#762)
  docs: add dynamic badge (elastic#760)
  Config values set to false should be false, not nil (elastic#761)
  Add changelog entry for updating log level on config's logger
  Add changelog entry for logging updated remote config values
  Add changelog entry for dynamic config values
  Check if env variable exists before setting up SimpleCov (elastic#759)
  Log the updated options from central config in addition to cumulative modifications (elastic#758)
  ci(jenkins): merge branch in downstream jobs (elastic#757)
  Log level on logger is updated when Config options are (elastic#755)
  Cobertura coverage (elastic#736)
  Allow Config values to be dynamic (elastic#747)
  Reorder checks in test in case values are being cleared before checked (elastic#743)
  ci(jenkins): disable stages for only docs (elastic#745)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants