RexOps / RexOps/Rex

Mock database connection to test Rex::Commands::DB

Open
#730 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
737
Forks
214
PR merge metrics
No merged PRs in 30d

Description

In my opinion it would be nice to avoid pulling in MySQL/MariaDB as a test dependency via Test::mysqld for the Rex::Commands::DB tests in t/db.t. Instead, we could use mocking to provide the test suite with data to work with.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with t/db.t and inspect how the Rex::Commands::DB tests use Test::mysqld and MySQL/MariaDB. Determine how mocked data can cover the existing test cases without a database dependency. Done means the DB tests pass without pulling in MySQL or MariaDB.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.