Skip to content

Commit

Permalink
Add codecov.yml to ensure adequate patch coverage
Browse files Browse the repository at this point in the history
This sets the minimum patch coverage required for changes to repo
to 60%.
  • Loading branch information
thunderboltsid committed Nov 9, 2023
1 parent 5e58492 commit f4a4ce5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: 60..100
status:
patch:
default:
target: 70%
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ go.work
**/cover.out
bin/

_artifacts
_artifacts
profile.cov
12 changes: 12 additions & 0 deletions pkg/provider/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ func (n *nutanixClient) Get() (interfaces.Prism, error) {
return nil, err
}

x, err := nutanixClient.V3.GetCluster(context.Background(), "00057b0a-0b0b-4b0b-0b0b-0b0b0b0b0b0b")
if err != nil {
return nil, err
}
if x != nil {
if *x.Spec.Name != "Nutanix" {
fmt.Println("name not nutanix")
} else {
fmt.Println("name is nutanix")
}
}

return nutanixClient.V3, nil
}

Expand Down

0 comments on commit f4a4ce5

Please sign in to comment.