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

Adding helm tests + goreportcard fixes #17

Merged
merged 3 commits into from
Mar 27, 2020
Merged

Conversation

lucasreed
Copy link
Contributor

  • made Kube struct private to the helm pkg
  • added helm tests for things that don't interact with kube
    • I might be able to improve coverage moving some things around later

@lucasreed lucasreed requested a review from sudermanjr as a code owner March 27, 2020 18:55
@codecov
Copy link

codecov bot commented Mar 27, 2020

Codecov Report

Merging #17 into master will increase coverage by 12.19%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #17       +/-   ##
===========================================
+ Coverage   52.36%   64.55%   +12.19%     
===========================================
  Files           5        5               
  Lines         254      268       +14     
===========================================
+ Hits          133      173       +40     
+ Misses        111       77       -34     
- Partials       10       18        +8     
Impacted Files Coverage Δ
pkg/api/versions.go 100.00% <ø> (ø)
pkg/helm/kube.go 0.00% <0.00%> (ø)
pkg/helm/helm.go 39.56% <60.00%> (+39.56%) ⬆️
pkg/api/output.go 74.54% <80.00%> (-4.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8fedac...5cd5852. Read the comment docs.

@@ -134,14 +141,19 @@ func (h *Helm) setCurrentReleases(allReleases []*Release) error {
// This function is ripped straight out of the helm 3 codebase with slight modification
// https://github.com/helm/helm/blob/193850a9e2c509acf1a499d98e8d23c12c134f11/pkg/storage/driver/util.go#L56-L84
func decodeReleaseSecret(data string) (*Release, error) {
if len(data) < 1 {
Copy link
Member

Choose a reason for hiding this comment

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

I love it when testing helps us catch stuff like this.

@sudermanjr
Copy link
Member

Thanks!!!!

@sudermanjr sudermanjr merged commit 7f7aa75 into master Mar 27, 2020
@sudermanjr sudermanjr deleted the lucasreed/helm_tests branch March 27, 2020 19:04
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.

2 participants