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

test: Use require_relative for test helpers files #2874

Merged
merged 1 commit into from Mar 11, 2020

Conversation

cosmo0920
Copy link
Contributor

Signed-off-by: Hiroshi Hatake hatake@clear-code.com

Which issue(s) this PR fixes:
None.

What this PR does / why we need it:

Without this patch, we need to run testcases with bundle exec rake test or additional TEST_OPTS environment variable to run individual testcases.

~\Documents\GitHub\fluentd [master ≡ +6 ~0 -0 !]> bundle exec ruby .\test\plugin\test_bare_output.rb
Traceback (most recent call last):
        3: from ./test/plugin/test_bare_output.rb:1:in `<main>'
        2: from ./test/plugin/test_bare_output.rb:1:in `require_relative'
        1: from C:/Users/cosmo/Documents/GitHub/fluentd/test/helper.rb:52:in `<top (required)>'
C:/Users/cosmo/Documents/GitHub/fluentd/test/helper.rb:52:in `require': cannot load such file -- helpers/fuzzy_assert (LoadError)

ruby /path/to/testcases_script.rb should run properly.

Docs Changes:

No need.

Release Note:

Same as title.

Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
@cosmo0920 cosmo0920 requested a review from ganmacs March 11, 2020 08:33
@cosmo0920 cosmo0920 merged commit 0bfde48 into master Mar 11, 2020
@cosmo0920 cosmo0920 deleted the run-testcases-individually branch March 11, 2020 09:42
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.

None yet

2 participants