Skip to content

improve test coverage - #21

Merged
akhy merged 5 commits into
mainfrom
feat/test-coverage
Jun 21, 2026
Merged

akhy merged 5 commits into
mainfrom
feat/test-coverage

Conversation

@akhy

@akhy akhy commented Jun 21, 2026

Copy link
Copy Markdown
Member

No description provided.

akhy added 5 commits June 21, 2026 03:01
Restricted Docker workflow trigger to tags only, as whctl is primarily a CLI tool and does not need Docker container builds on every main push/PR.
…pi types

Add unit tests for labels path resolution, retrieval, updates, and key validation. Add test cases for context-based fs builders, local fs error states, yaml custom marshaling errors, and custom api type marshalling edge cases.
Introduce an in-process SSH server inside client_test.go to test actual SSH authentication (both key bytes and files), command output execution (stdout streaming and return buffers), interactive TTY runs, and connection failure states deterministically.
Create unit tests for the rsync package by starting an in-process mock SSH/SFTP server. Test successful directory and file synchronization, connection errors, identity file lookup errors, filesystem read/stat failures, and remote host username parsing.
Skip OS username-fallback tests when running in platforms or CI environments (like minimal Docker containers or restricted runner setups) where user.Current() is not supported or fails.
@akhy
akhy merged commit 0f3cdab into main Jun 21, 2026
4 checks passed
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@akhy
akhy deleted the feat/test-coverage branch June 21, 2026 14:35
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.

1 participant