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

Testing: Kernel::System::UnitTest::Helper should not depend on the Driver object #617

Closed
bschmalhofer opened this issue Nov 4, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

The Kernel::System::UnitTest::Driver object is only used for emitting TAP and writing diagnostics. This can be done with Test2::VO. No need to intertwine these modules. Remember that the Helper can, and should be, used even when the driver is not used.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Nov 4, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0.6 milestone Nov 4, 2020
@bschmalhofer bschmalhofer self-assigned this Nov 4, 2020
bschmalhofer added a commit that referenced this issue Nov 4, 2020
…out_drivr

Issue #617: don't use Kernel::System::UnitTest::Driver in Helper.pm
@bschmalhofer
Copy link
Contributor Author

Removed dependency. Tests look fine. Closing the issue.

@bschmalhofer
Copy link
Contributor Author

Reopen because I've seen warnings like:

Attempt to get Test2 context after testing has completed (did you attempt a testing event after done_testing?) at /opt/otobo_install/local/lib/perl5/Test2/Tools/Basic.pm line 47.
        Test2::Tools::Basic::note("Set test user 169 to invalid") called at Kernel/System/UnitTest/Helper.pm line 613
        Kernel::System::UnitTest::Helper::DESTROY(Kernel::System::UnitTest::Helper=HASH(0x564d332c24d8)) called at P.t line 0
        eval {...} called at P.t line 0
[Wed Nov  4 14:37:07 2020] P.t:         (in cleanup)    (in cleanup)  at /opt/otobo_install/local/lib/perl5/Test2/API.pm line 392 during global destruction.

bschmalhofer added a commit that referenced this issue Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant