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 File share unit test cases,coverage > 50% #1295

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nguptaopensds
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature
/kind bug fix
/kind cleanup
/kind revert change
/kind design
/kind documentation

/kind enhancement

What this PR does / why we need it:
Added test case for create file share in pkg/controller package

Which issue(s) this PR fixes:

Fixes #1270

Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind TESTED

/kind NOT-TESTED

Test Report:

Special notes for your reviewer:

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2020

Codecov Report

Merging #1295 into master will decrease coverage by 0.90%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1295      +/-   ##
==========================================
- Coverage   41.48%   40.58%   -0.91%     
==========================================
  Files          53       53              
  Lines        7752     6966     -786     
==========================================
- Hits         3216     2827     -389     
+ Misses       4021     3574     -447     
- Partials      515      565      +50     
Impacted Files Coverage Δ
client/volume.go 62.31% <0.00%> (-8.40%) ⬇️
client/fileshare.go 65.95% <0.00%> (-7.22%) ⬇️
client/dock.go 42.85% <0.00%> (-7.15%) ⬇️
client/pool.go 42.85% <0.00%> (-7.15%) ⬇️
client/host.go 61.11% <0.00%> (-6.98%) ⬇️
client/version.go 46.15% <0.00%> (-6.79%) ⬇️
client/profile.go 55.55% <0.00%> (-6.42%) ⬇️
pkg/api/policy/policy.go 25.88% <0.00%> (-5.19%) ⬇️
pkg/api/controllers/version.go 65.21% <0.00%> (-4.02%) ⬇️
pkg/api/controllers/base.go 76.74% <0.00%> (-3.26%) ⬇️
... and 43 more

@nguptaopensds nguptaopensds changed the title Adding create fileshare unit test case, coverage 17.7% to 25.1% Adding create and delete fileshare unit test case Jun 15, 2020
@nguptaopensds nguptaopensds changed the title Adding create and delete fileshare unit test case Adding File share unit test cases, coerage > 50% Jun 16, 2020
@nguptaopensds nguptaopensds changed the title Adding File share unit test cases, coerage > 50% Adding File share unit test cases,coverage > 50% Jun 16, 2020
pkg/api/controllers/fileshare_test.go Show resolved Hide resolved
assertTestResult(t, w.Code, 202)
})

t.Run("Should return 500 if delete file share snapshot with bad request", func(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why Bad request is 500 error? Should it not be 400?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will check once, may be we need to change main code

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this resolved?

pkg/api/controllers/fileshare_test.go Show resolved Hide resolved
testutils/collection/data.go Show resolved Hide resolved
Copy link
Collaborator

@kumarashit kumarashit left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Adding test cases to api/controller directory for getting coverage >60%
4 participants