Unit tests should be added or modified based on the following analysis of the attached coverage report.
If you would like to contribute, you do not have to increase coverage for all files. Feel free to add a comment to this issue stating which one you would like to pick up and add changes for. When the changes are done, make a pull request with those changes and reference this issue in the pull request comments.
This issue will be closed once coverage on all files are completed.
Coverage Report
To get the coverage report run the following commands from the root directory of the packageless project on git branch main:
go test --coverprofile=coverage.out ./...
go tool cover --html=coverage.out
Analysis of Coverage Report
github.com/everettraven/packageless/main.go
does not need modification
github.com/everettraven/packageless/subcommands/install_sc.go
- If possible, tests to test the logic based on different GOOS values should be created.
github.com/everettraven/packageless/subcommands/run_sc.go
- Tests should be added to test that the current working directory is being added to the volumes array if a volume path is equivalent to ""
github.com/everettraven/packageless/subcommands/subcommand.go
- Test should be added to test that the error is being throw properly if the length of the args variable is < 1
github.com/everettraven/packageless/subcommands/uninstall_sc.go
- If possible, tests to test the logic based on different GOOS values should be created.
github.com/everettraven/packageless/subcommands/update_sc.go
does not need modification
github.com/everettraven/packageless/subcommands/upgrade_sc.go
- Test should be added to test that the error is being thrown properly if the pim config file does not exist
github.com/everettraven/packageless/subcommands/version_sc.go
does not need modification
github.com/everettraven/packageless/utils/alias_unix.go
does not need modification
github.com/everettraven/packageless/utils/alias_win.go
does not need modification
github.com/everettraven/packageless/utils/docker.go
- Test should be added to cover the case when the length of variable
splitVol
is != 3
github.com/everettraven/packageless/utils/hcl_parse.go
- Test should be added to cover the case when an unexpected type is passed to the
ParseBody
function
github.com/everettraven/packageless/utils/mocks.go
does not need modification
github.com/everettraven/packageless/utils/utils.go
does not need modification