Skip to content

test: Use require_relative for test helpers files#2874

Merged
cosmo0920 merged 1 commit into
masterfrom
run-testcases-individually
Mar 11, 2020
Merged

test: Use require_relative for test helpers files#2874
cosmo0920 merged 1 commit into
masterfrom
run-testcases-individually

Conversation

@cosmo0920

Copy link
Copy Markdown
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.

2 participants