Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

test(scripts): cover a missing or malformed --compose command in wait_for_cubrid

Closed Beginner friendly
#447 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
testing

Research direction

Read tests/test_wait_for_cubrid.py and its existing wait() helper, then inspect scripts/wait_for_cubrid.py to confirm the reported behavior and CLI errors. Add bounded tests for a missing executable, an empty --compose value, and an unparsable value, checking the specified exit codes and stderr. Run python -m pytest tests/test_wait_for_cubrid.py -q; done means all three cases pass without changing the script unless a confirmed bug is reported.

Written by the indexing model from the issue text.

Description

good first issue priority: low size: S testing

Problem and evidence (main f034ab8, 2026-10-23)

scripts/wait_for_cubrid.py (run by make up) handles three input errors that tests/test_wait_for_cubrid.py does not cover:

  • A --compose executable that does not exist: the OSError stops the probe loop on the first attempt instead of retrying until --timeout. The script prints CUBRID readiness failed ...: [Errno 2] ... and a Compose ... diagnostics failed line for ps and logs, then exits 1.
  • An empty --compose '': exits 2 with --compose must name an executable.
  • An unparsable --compose '"unbalanced': exits 2 with the shlex error (No closing quotation).

Reproduction:

python3 scripts/wait_for_cubrid.py --compose /nonexistent/compose --timeout 5   # exits 1 in well under 5 s
python3 scripts/wait_for_cubrid.py --compose ''                                # exits 2
python3 scripts/wait_for_cubrid.py --compose '"unbalanced'                     # exits 2

Files / scope

  • tests/test_wait_for_cubrid.py (test-only)

Acceptance criteria

  • A missing --compose executable exits 1 well before --timeout. stderr names the error and reports that both diagnostics failed.
  • An empty --compose and an unparsable --compose each exit 2 with the argparse error, and no compose process runs.
  • Reuse the existing wait() helper or the same subprocess pattern, and keep each test bounded by a timeout like the existing tests.
  • No change to scripts/wait_for_cubrid.py, unless a confirmed bug is found and reported first.

Validation

python -m pytest tests/test_wait_for_cubrid.py -q
make check test

No database or Docker is needed. Include Docs: not needed - test-only change in the PR body.

New contributor guidance

Human-led contributors may submit a PR for an unassigned good first issue without prior approval or Assignee rights, after checking existing claims and PRs. Maintainer-operated autonomous agents still need explicit authorization for this specific issue.

Dominant language
Python
Stars
28
Forks
9
Avg merge
8h 25m
Merged PRs (30d)
183

Getting set up

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.

More from cubrid-lab/cubrid-cookbook-python

All issues in cubrid-lab/cubrid-cookbook-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.