Skip to content

test: improve appconfig.go coverage#6

Merged
github-actions[bot] merged 1 commit intomainfrom
dev
May 5, 2026
Merged

test: improve appconfig.go coverage#6
github-actions[bot] merged 1 commit intomainfrom
dev

Conversation

@mar0ls
Copy link
Copy Markdown
Owner

@mar0ls mar0ls commented May 5, 2026

Adds missing test cases for appconfig.go — curl, wget, pip, npm not-found paths, git https.proxy failure, file permission error paths. Coverage on main package.

Copilot AI review requested due to automatic review settings May 5, 2026 15:02
@github-actions github-actions Bot merged commit f399072 into main May 5, 2026
25 checks passed
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds targeted unit tests to increase coverage for appconfig.go, focusing on previously untested success paths and error paths (missing external commands, command failures, and filesystem permission/creation failures).

Changes:

  • Added tests for writing/clearing curl and wget proxy config files (.curlrc, .wgetrc).
  • Added tests for pip config writing and error handling (including directory creation failures).
  • Added tests for “command not found” and command failure paths for git and npm, plus read-permission error paths for shared file helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread appconfig_test.go
Comment on lines +596 to +603
func TestEditKeyValueFileReadError(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("permission bits not enforced the same way on Windows")
}
path := filepath.Join(t.TempDir(), "conf")
if err := os.WriteFile(path, []byte("key = val\n"), 0o000); err != nil {
t.Fatal(err)
}
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.

3 participants