Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Coverage is still low #2

Open
vitorfhc opened this issue Mar 20, 2022 · 0 comments
Open

[Tests] Coverage is still low #2

vitorfhc opened this issue Mar 20, 2022 · 0 comments
Labels
good first issue Good for newcomers hacktoberfest tests Related to tests implementation

Comments

@vitorfhc
Copy link
Owner

Output for go test -coverprofile cover.out ./... && go tool cover -func ./c.out:

?       github.com/vitorfhc/bob [no test files]
?       github.com/vitorfhc/bob/cmd     [no test files]
?       github.com/vitorfhc/bob/pkg/bob [no test files]
ok      github.com/vitorfhc/bob/pkg/docker      0.416s  coverage: 19.4% of statements
?       github.com/vitorfhc/bob/pkg/docker/outputs      [no test files]
ok      github.com/vitorfhc/bob/pkg/helpers/fs  0.512s  coverage: 69.2% of statements
github.com/vitorfhc/bob/pkg/docker/client.go:10:        init                    75.0%
github.com/vitorfhc/bob/pkg/docker/image.go:33:         FullName                40.0%
github.com/vitorfhc/bob/pkg/docker/image.go:44:         Build                   0.0%
github.com/vitorfhc/bob/pkg/docker/image.go:83:         Push                    11.8%
github.com/vitorfhc/bob/pkg/docker/image.go:113:        generateFullNames       66.7%
github.com/vitorfhc/bob/pkg/docker/image.go:125:        initLogger              0.0%
github.com/vitorfhc/bob/pkg/docker/image.go:133:        log                     0.0%
github.com/vitorfhc/bob/pkg/docker/image.go:138:        scanBody                0.0%
github.com/vitorfhc/bob/pkg/docker/image_list.go:14:    NewImageListFromYaml    37.5%
github.com/vitorfhc/bob/pkg/helpers/fs/fs.go:10:        FileExists              100.0%
github.com/vitorfhc/bob/pkg/helpers/fs/fs.go:18:        FindFileWithExtensions  100.0%
github.com/vitorfhc/bob/pkg/helpers/fs/fs.go:33:        ReadYamlFile            0.0%
total:                                                  (statements)            27.4%

Total coverage is still low, we need to improve this. Docker functions such as Build and Push may be tested using gruntwork-io/terratest.

@vitorfhc vitorfhc added good first issue Good for newcomers tests Related to tests implementation labels Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest tests Related to tests implementation
Projects
None yet
Development

No branches or pull requests

1 participant