Conversation
Add 153 tests covering all slic CLI commands using black-box testing approach (control working directory, files, env vars, CLI args; assert on stdout/stderr output). Includes test infrastructure improvements: - Close stdin in slicExec to prevent interactive prompts from blocking - Add git mock binary to prevent real git clone calls from hanging - Set SLIC_INTERACTIVE=0 as defense-in-depth against readline prompts Fix missing echo in mysql help command (help text was built but never output).
Open
Set dummy SSH_AUTH_SOCK, isolated SLIC_CACHE_DIR, and deterministic HOME in test harness to avoid CI-specific failures.
Add $stdin parameter to slicExec() to support piping input to interactive commands. When provided, uses proc_open() with SLIC_INTERACTIVE=1 instead of shell_exec() with /dev/null. Add interactive tests for the target command flow.
- Add createTempDir() helper to BaseTestCase with automatic tearDown cleanup - Guard proc_open and fwrite (including partial writes) with $this->fail() - Merge stderr via 2>&1 in proc_open path to match shell_exec behavior - Cast stream_get_contents to string to handle false return - Document small-payload deadlock limitation in slicExec() PHPDoc - Add completion install confirm test verifying .bashrc is written - Add completion install decline test verifying cancellation - Add completion install fish confirm test verifying symlink creation - Add site-cli _install decline test verifying command does not execute - Consolidate target interactive tests into single test with exact prompts - Fix pre-existing @rmdir in test_completion_no_args to use createTempDir()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
slicExec()to prevent interactive prompts from blockingechoinmysql helpcommand (help text was built but never output)